package org.dromara.system.domain.bo;

import org.dromara.system.domain.SysArea;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 区域业务对象 sys_area
 *
 * @author LionLi
 * @date 2024-04-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = SysArea.class, reverseConvertGenerate = false)
public class SysAreaBo extends BaseEntity {

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

    /**
     * 区域名
     */
    @NotBlank(message = "区域名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String areaName;

    /**
     * 上级
     */
    @NotNull(message = "上级不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long up;

    /**
     * 级别
     */
    @NotNull(message = "级别不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long level;

    /**
     * 排序
     */
    @NotNull(message = "排序不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long sort;

    /**
     * 区域code
     */
    @NotBlank(message = "区域code不能为空", groups = { AddGroup.class, EditGroup.class })
    private String code;

    /**
     * 1 可用/  0 不可用
     */
    @NotNull(message = "1 可用/  0 不可用不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer isUse;

    /**
     * 区域编码
     */
    @NotBlank(message = "区域编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String areaCode;


}
