package com.cico.nest.lcdp.boot.core.system.controller.admin.dept.vo.dept;

import com.cico.nest.lcdp.framework.common.enums.CommonStatusEnum;
import com.cico.nest.lcdp.framework.common.validation.InEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;


@Schema(description = "管理后台 - 组织创建/修改 Request VO")
@Data
public class DeptSaveReqV2VO {

    @Schema(description = "组织编号", example = "1024")
    private String id;

    @Schema(description = "父组织 ID", example = "1024")
    private String parentId;

    @Schema(description = "组织名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "lcdp")
    @NotBlank(message = "组织名称不能为空")
    @Size(max = 30, message = "组织名称长度不能超过 30 个字符")
    private String name;

    @Schema(description = "显示顺序不能为空", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    @NotNull(message = "显示顺序不能为空")
    private Integer sort;

    @Schema(description = "负责人的用户编号", example = "2048")
    private Long leaderUserId;

    @Schema(description = "联系电话", example = "15601691000")
    @Size(max = 11, message = "联系电话长度不能超过11个字符")
    private String phone;

    @Schema(description = "邮箱", example = "lcdp@test.cn")
    @Email(message = "邮箱格式不正确")
    @Size(max = 50, message = "邮箱长度不能超过 50 个字符")
    private String email;

    @Schema(description = "状态,见 CommonStatusEnum 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
    private Integer status ;

    /*********  以下新增  ********/
    @Schema(description = "组织别名", requiredMode = Schema.RequiredMode.REQUIRED, example = "lcdp")
    @NotBlank(message = "组织别名不能为空")
    @Size(max = 30, message = "组织名称长度不能超过30个字符")
    private String alias;

    @Schema(description = "组织编码", requiredMode = Schema.RequiredMode.REQUIRED, example = "123")
    @Size(max = 50, message = "组织编码长度不能超过50个字符")
    private String code;

    @Schema(description = "管理处", requiredMode = Schema.RequiredMode.REQUIRED, example = "123")
    @NotBlank(message = "管理处不能为空")
    private String adminName;

    /**
     * 组织类型(见字典):39001省中心，39002-监控中心，39003-区域监控中心，39004-监控分中心，39005-隧道所，39006-救援站
     */
    @Schema(description = "组织类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "39001")
    @NotBlank(message = "组织类型不能为空")
    private String type;
    /**
     * 组织等级:39101一级，39102二级，39103三级，39104四级，39105五级，39106六级
     */
    @Schema(description = "组织等级", requiredMode = Schema.RequiredMode.REQUIRED, example = "39001")
    @NotNull(message = "组织等级不能为空")
    private Integer level;

    /**
     * 集团内外(见字典)：39201集团内，39202集团外
     */
    @Schema(description = "集团内外", requiredMode = Schema.RequiredMode.REQUIRED, example = "39201")
    private String inGroup;

    /**
     * 板块id
     */
    @Schema(description = "所属板块", requiredMode = Schema.RequiredMode.REQUIRED, example = "39201")
    private String plateId;

    /**
     * 纬度信息
     */
    @Schema(description = "纬度", requiredMode = Schema.RequiredMode.REQUIRED, example = "23.101")
    private String latitude;
    /**
     * 经度信息
     */
    @Schema(description = "经度", requiredMode = Schema.RequiredMode.REQUIRED, example = "120.01")
    private String longitude;
    /**
     * 备注
     */
    @Schema(description = "备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "备注")
    private String remarks;

}
