package com.fuyuanshen.equipment.domain.bo;

import com.fuyuanshen.common.core.validate.AddGroup;
import com.fuyuanshen.common.core.validate.EditGroup;
import com.fuyuanshen.equipment.domain.DeviceGroup;
import com.fuyuanshen.common.mybatis.core.domain.BaseEntity;
import io.github.linpeilie.annotations.AutoMapper;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 设备分组业务对象 device_group
 *
 * @author Lion Li
 * @date 2025-08-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = DeviceGroup.class, reverseConvertGenerate = false)
public class DeviceGroupBo extends BaseEntity {

    /**
     * 主键ID
     */
    // @NotNull(message = "主键ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 分组名称
     */
    @Schema(title = "分组名称")
    @NotBlank(message = "分组名称不能为空", groups = {AddGroup.class, EditGroup.class})
    private String groupName;

    /**
     * 状态：0-禁用，1-正常
     */
    @Schema(title = "状态：0-禁用，1-正常")
    // @NotNull(message = "状态：0-禁用，1-正常不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long status;

    /**
     * 父分组ID
     * parent_id
     */
    @Schema(title = "父分组ID")
    private Long parentId;

    /**
     * 完整分组路径
     */
    private String fullPath;

    /**
     * 删除标记：0-未删除，1-已删除
     */
    // @NotNull(message = "删除标记：0-未删除，1-已删除不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long isDeleted;


    @Schema(title = "页码", example = "1")
    private Integer pageNum = 1;

    @Schema(title = "每页数据量", example = "10")
    private Integer pageSize = 10;

}
