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.annotation.Excel;
import com.ltgk.common.validation.groups.Add;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

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

/**
 * 船员违规记录对象 ds_crew_illegal
 *
 * @author Qi ChengBin
 * @date 2024-12-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ds_crew_illegal")
@ApiModel(value = "船员违规记录对象", description = "船员违规记录表")
public class DsCrewIllegal extends Model<DsCrewIllegal> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "船员违规记录主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @Excel(name = "船员id")
    @ApiModelProperty(value = "船员id")
    @TableField(value = "crew_id")
    @NotNull(message = "船员主键信息不能为空！", groups = Add.class)
    private String crewId;

    @Excel(name = "船员姓名")
    @ApiModelProperty(value = "船员姓名")
    @TableField(value = "crew_name")
    private String crewName;

    @Excel(name = "联系方式")
    @ApiModelProperty(value = "联系方式")
    @TableField(value = "crew_phone")
    private String crewPhone;

    @Excel(name = "违规类型", readConverterExp = "证书违规、行为违规")
    @ApiModelProperty(value = "违规类型")
    @TableField(value = "illegal_type")
    private String illegalType;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "违规时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "违规时间")
    @TableField(value = "illegal_time")
    private Date illegalTime;

    @Excel(name = "违规情况")
    @ApiModelProperty(value = "违规情况")
    @TableField(value = "illegal_situation_info")
    private String illegalSituationInfo;

    @Excel(name = "处理情况")
    @ApiModelProperty(value = "处理情况")
    @TableField(value = "accept_info")
    private String acceptInfo;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "处理时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "处理时间")
    @TableField(value = "accept_time")
    private Date acceptTime;

    @Excel(name = "处理方式", readConverterExp = "罚=款、没收违规工具")
    @ApiModelProperty(value = "处理方式")
    @TableField(value = "accept_way")
    private String acceptWay;

    @Excel(name = "执法人员")
    @ApiModelProperty(value = "执法人员")
    @TableField(value = "law_executor")
    private String lawExecutor;

    @Excel(name = "附件", readConverterExp = "图=片")
    @ApiModelProperty(value = "附件")
    @TableField(value = "file")
    private String file;

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

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_at")
    private Date createAt;

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

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_at")
    private Date updateAt;

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

    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    @TableField(value = "remark")
    private String remark;

    @Excel(name = "受理状态[番禺项目，表中有字段，实体中没有]")
    @ApiModelProperty(value = "受理状态[番禺项目，表中有字段，实体中没有]")
    @TableField(value = "accept_status")
    private String acceptStatus;

    @Excel(name = "受理人[番禺项目，表中有字段，实体中没有]")
    @ApiModelProperty(value = "受理人[番禺项目，表中有字段，实体中没有]")
    @TableField(value = "accept_person")
    private String acceptPerson;

    @Excel(name = "受理人id[番禺项目，表中有字段，实体中没有]")
    @ApiModelProperty(value = "受理人id[番禺项目，表中有字段，实体中没有]")
    @TableField(value = "accept_person_id")
    private String acceptPersonId;

    @Excel(name = "违规原因[番禺项目，表中有字段，实体中没有]")
    @ApiModelProperty(value = "违规原因[番禺项目，表中有字段，实体中没有]")
    @TableField(value = "illegal_reason")
    private String illegalReason;

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

    @ApiModelProperty(value = "行政区域名称")
    @TableField(value = "area_name")
    private String areaName;
}
