package com.emergency.avenue.storage.api.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Schema(description = "机构信息")
@TableName(value = "dock_organization_info", autoResultMap = true)
@EqualsAndHashCode
public class DockOrganizationDO {

    @Schema(description = "机构名称", example = "浙江测试机构1", required = true)
    @NotNull(message = "机构名称不能为空")
    private String orgName;

    @Schema(description = "机构别名", example = "")
    private String orgAlias;

    @Schema(description = "外部机构编码", example = "555555", required = true)
    @NotNull(message = "外部机构编码不能为空")
    private String waybillCode;

    @Schema(description = "父机构编码", example = "DEP202109240000171")
    private String parentNo;

    @Schema(description = "层级", example = "4", required = true)
    @NotNull(message = "层级不能为空")
    private Byte level;

    @Schema(description = "机构所在省名称", example = "浙江省", required = true)
    @NotNull(message = "机构所在省名称不能为空")
    private String provinceName;

    @Schema(description = "机构所在省编码", example = "330000", required = true)
    @NotNull(message = "机构所在省编码不能为空")
    private String provinceCode;

    @Schema(description = "机构所在市名称", example = "杭州市", required = true)
    @NotNull(message = "机构所在市名称不能为空")
    private String cityName;

    @Schema(description = "机构所在市编码", example = "330100", required = true)
    @NotNull(message = "机构所在市编码不能为空")
    private String cityCode;

    @Schema(description = "机构所在区县名称", example = "上城区", required = true)
    @NotNull(message = "机构所在区县名称不能为空")
    private String countyName;

    @Schema(description = "机构所在区县编码", example = "330102", required = true)
    @NotNull(message = "机构所在区县编码不能为空")
    private String countyCode;

    @Schema(description = "机构所在乡镇名称", example = "")
    private String townName;

    @Schema(description = "机构所在乡镇编码", example = "")
    private String townCode;

    @Schema(description = "详细地址", example = "人民政府", required = true)
    @NotNull(message = "详细地址不能为空")
    private String address;

    @Schema(description = "省行政区划编号", example = "310000", required = true)
    @NotNull(message = "省行政区划编号不能为空")
    private String provinceAdminAreaNo;

    @Schema(description = "市行政区划编号", example = "310100")
    private String cityAdminAreaNo;

    @Schema(description = "县行政区划编号", example = "")
    private String countyAdminAreaNo;

    @Schema(description = "行政区划名称", example = "浙江省/杭州市", required = true)
    @NotNull(message = "行政区划名称不能为空")
    private String adminAreaName;

    @Schema(description = "行政区划编码", example = "330100", required = true)
    @NotNull(message = "行政区划编码不能为空")
    private String adminAreaNo;

    @Schema(description = "联系人", example = "")
    private String contactPerson;

    @Schema(description = "联系人手机号", example = "")
    private String mobilePhone;

    @Schema(description = "联系人座机号", example = "")
    private String phone;

    @Schema(description = "机构类型", example = "1", required = true)
    @NotNull(message = "机构类型不能为空")
    private Integer orgType;

    @Schema(description = "外部仓库编码", example = "")
    private String outWarehouseNo;

    @Schema(description = "机构职能", example = "YJ,JZ,FH", required = true)
    @NotNull(message = "机构职能不能为空")
    private String orgFunctionNos;

    @Schema(description = "备注", example = "")
    private String remark;

    @Schema(description = "状态", example = "1", required = true)
    @NotNull(message = "状态不能为空")
    private Byte status;
}
