package com.ltgk.crew.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ltgk.common.validation.groups.Add;
import com.ltgk.common.validation.groups.Detail;
import com.ltgk.common.validation.groups.GetBoatCrewMessageGroup;
import com.ltgk.common.validation.groups.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.util.Date;

/**
 * 船员档案对象 ds_boat_crew
 *
 * @author Qi ChengBin
 * @date 2024-12-23
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ds_boat_crew")
@ApiModel(value = "船员档案对象", description = "船员档案表")
public class DsBoatCrew extends Model<DsBoatCrew> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @NotBlank(message = "船员档案信息主键不可为空", groups = {Update.class, Detail.class})
    private String id;

    @ApiModelProperty(value = "流水号")
    @TableField(value = "water_code")
    private String waterCode;

    @ApiModelProperty(value = "船员姓名")
    @NotBlank(message = "船员姓名不可为空！", groups = {Add.class, Update.class, GetBoatCrewMessageGroup.class})
    @TableField(value = "crew_name")
    private String crewName;

    @ApiModelProperty(value = "船员姓名拼音")
    @TableField(value = "crew_name_py")
    private String crewNamePy;

    @ApiModelProperty(value = "身份证号")
    @NotBlank(message = "身份证号不可为空！", groups = {Add.class, Update.class})
    @TableField(value = "id_card_no")
    private String idCardNo;

    @ApiModelProperty(value = "身份证图片")
    @TableField(value = "id_card_pic")
    private String idCardPic;

    @ApiModelProperty(value = "性别:1-男;2-女")
    @TableField(value = "sex")
    private String sex;

    @ApiModelProperty(value = "电话")
    @TableField(value = "phone")
    private String phone;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "出生日期")
    @TableField(value = "birthday")
    private Date birthday;

    @ApiModelProperty(value = "民族")
    @TableField("nation")
    private String nation;

    @ApiModelProperty(value = "年龄")
    @TableField("age")
    private Integer age;

    @ApiModelProperty(value = "文化程度")
    @TableField("education")
    private String education;

    @ApiModelProperty(value = "户籍省份")
    @TableField(value = "residence_province")
    private String residenceProvince;

    @ApiModelProperty(value = "户籍城市")
    @TableField(value = "residence_city")
    private String residenceCity;

    @ApiModelProperty(value = "户籍区县")
    @TableField(value = "residence_district")
    private String residenceDistrict;

    @ApiModelProperty(value = "户籍地址")
    @TableField(value = "residence")
    private String residence;

    @ApiModelProperty(value = "现住址")
    @TableField(value = "address")
    private String address;

    @ApiModelProperty(value = "证书类型")
    @TableField(value = "certificate_type")
    private String certificateType;

    @ApiModelProperty(value = "证书类型名称")
    @TableField(value = "certificate_type_name")
    private String certificateTypeName;

    @ApiModelProperty(value = "类别代码")
    @TableField(value = "category_code")
    private String categoryCode;

    @ApiModelProperty(value = "类别名称")
    @TableField(value = "category_name")
    private String categoryName;

    @ApiModelProperty(value = "证书种类代码")
    @TableField(value = "certificate_kind_code")
    private String certificateKindCode;

    @ApiModelProperty(value = "证书种类名称")
    @TableField(value = "certificate_kind_name")
    private String certificateKindName;

    @ApiModelProperty(value = "船员证书等级")
    @TableField(value = "certificate_level")
    private String certificateLevel;

    @ApiModelProperty(value = "船员证书等级名称")
    @TableField(value = "certificate_level_name")
    private String certificateLevelName;

    @ApiModelProperty(value = "证书职务")
    @TableField(value = "certificate_post")
    private String certificatePost;

    @ApiModelProperty(value = "证书职务名称")
    @TableField(value = "certificate_post_name")
    private String certificatePostName;

    @ApiModelProperty(value = "适用船舶")
    @TableField(value = "apply_boat")
    private String applyBoat;

    @ApiModelProperty(value = "船员证书号码")
    @TableField(value = "certificate_code")
    private String certificateCode;

    @ApiModelProperty(value = "船上职务ID")
    @TableField("boat_duty_id")
    private String boatDutyId;

    @ApiModelProperty(value = "船上职务")
    @NotBlank(message = "船上职务不可为空！", groups = {Add.class, Update.class})
    @TableField("boat_duty_name")
    private String boatDutyName;

    @ApiModelProperty(value = "签发机关")
    @TableField(value = "certificate_authority")
    private String certificateAuthority;

    @ApiModelProperty(value = "签发机关名称")
    @TableField(value = "certificate_authority_name")
    private String certificateAuthorityName;

    @ApiModelProperty(value = "签发官员姓名")
    @TableField(value = "certificate_people")
    private String certificatePeople;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "签发日期")
    @TableField(value = "certificate_issued_date")
    private Date certificateIssuedDate;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "截止日期")
    @TableField(value = "certificate_expired_date")
    private Date certificateExpiredDate;

    @ApiModelProperty(value = "证书状态:A-无效(待发证) 0-无效(到期) 1-有效 2-无效(换证) 3-无效(注销)")
    @TableField(value = "certificate_status")
    private String certificateStatus;

    @ApiModelProperty(value = "证书照片")
    @TableField(value = "certificate_pic")
    private String certificatePic;

    @ApiModelProperty(value = "档案号码")
    @TableField(value = "archives_code")
    private String archivesCode;

    @ApiModelProperty(value = "多职务标志(其它证书流水号，分号隔开)")
    @TableField(value = "many_positions_flag")
    private String manyPositionsFlag;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "时间戳")
    @TableField(value = "timestamp")
    private Date timestamp;

    @ApiModelProperty(value = "操作时间")
    @TableField(value = "operate_time")
    private String operateTime;

    @ApiModelProperty(value = "紧急联系人")
    @TableField(value = "urgent_man")
    private String urgentMan;

    @ApiModelProperty(value = "紧急联系电话")
    @TableField(value = "urgent_phone")
    private String urgentPhone;

    @ApiModelProperty(value = "当前服务船舶")
    @TableField(value = "boat_id")
    private String boatId;

    @ApiModelProperty(value = "当前服务船舶")
    @TableField(value = "boat_name")
    private String boatName;

    @ApiModelProperty(value = "曾服务船舶")
    @TableField(value = "once_boat")
    private String onceBoat;

    @ApiModelProperty(value = "行政区域编码")
    @TableField(value = "area_code")
    private String areaCode;

    @ApiModelProperty(value = "行政区域名称")
    @NotBlank(message = "行政区域名称不可为空", groups = {Add.class, Update.class})
    @TableField(value = "area_name")
    private String areaName;

    @TableLogic(delval = "1", value = "0")
    @TableField(value = "del_flag")
    @ApiModelProperty(value = "删除标志: 0-未删除, 1-已删除")
    private Integer delFlag;

    @ApiModelProperty(value = "创建者")
    @TableField(value = "create_by")
    private String createBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_at")
    private Date createAt;

    @ApiModelProperty(value = "更新者")
    @TableField(value = "update_by")
    private String updateBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_at")
    private Date updateAt;

    @ApiModelProperty(value = "备注")
    @TableField(value = "remarks")
    private String remarks;

}
