package com.ltgk.boat.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ltgk.crew.domain.entity.DsBoatCrew;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 渔船进港信息对象 ds_enter_port
 *
 * @author Qi ChengBin
 * @date 2024-12-19
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ds_enter_port")
@ApiModel(value = "渔船进港信息对象", description = "渔船进港信息表")
public class DsEnterPort extends Model<DsEnterPort> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @JsonProperty("id")
    private String id;

    @JsonProperty("portId")
    @ApiModelProperty(value = "所属渔港id")
    @TableField("port_id")
    private String portId;

    @JsonProperty("portName")
    @ApiModelProperty(value = "所属渔港名称")
    @TableField(value = "port_name", condition = SqlCondition.LIKE)
    private String portName;

    @JsonProperty("boatId")
    @ApiModelProperty(value = "船舶id")
    @TableField("boat_id")
    private String boatId;

    @JsonProperty("boatName")
    @ApiModelProperty(value = "船名号")
    @TableField(value = "boat_name", condition = SqlCondition.LIKE)
    private String boatName;

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

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

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

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

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

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

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

    @JsonProperty("registerId")
    @ApiModelProperty(value = "登记人员主键")
    @TableField("register_id")
    private String registerId;

    @JsonProperty("registerName")
    @ApiModelProperty(value = "登记人员姓名")
    @TableField("register_name")
    private String registerName;

    @JsonProperty("registerPhone")
    @ApiModelProperty(value = "登记人员手机号")
    @TableField("register_phone")
    private String registerPhone;

    @JsonProperty("registerUnit")
    @ApiModelProperty(value = "登记人员单位")
    @TableField("register_unit")
    private String registerUnit;

    @JsonProperty("registerType")
    @ApiModelProperty(value = "登记人员类型")
    @TableField("register_type")
    private String registerType;

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

    @JsonProperty("boatMaterial")
    @ApiModelProperty(value = "船舶材质")
    @TableField("boat_material")
    private String boatMaterial;

    @JsonProperty("length")
    @ApiModelProperty(value = "船舶长度")
    @TableField("length")
    private BigDecimal length;

    @JsonProperty("mainPower")
    @ApiModelProperty(value = "船舶功率")
    @TableField("main_power")
    private BigDecimal mainPower;

    @JsonProperty("examineCode")
    @ApiModelProperty(value = "检验国籍证书")
    @TableField("examine_code")
    private String examineCode;

    @JsonProperty("nationalityCode")
    @ApiModelProperty(value = "国籍证书")
    @TableField("nationality_code")
    private String nationalityCode;

    @JsonProperty("aisNumber")
    @ApiModelProperty(value = "ais号")
    @TableField("ais_number")
    private String aisNumber;

    @JsonProperty("bdId")
    @ApiModelProperty(value = "北斗id")
    @TableField("bd_id")
    private String bdId;

    @JsonProperty("typesOfCatch")
    @ApiModelProperty(value = "渔获种类")
    @TableField("types_of_catch")
    private String typesOfCatch;

    @JsonProperty("catchWeight")
    @ApiModelProperty(value = "渔获重量")
    @TableField("catch_weight")
    private BigDecimal catchWeight;

    @JsonProperty("status")
    @ApiModelProperty(value = "状态:0=未审核，1=审核通过，2=拒绝")
    @TableField("status")
    private Integer status;

    @JsonProperty("captionSign")
    @ApiModelProperty(value = "船长签名")
    @TableField("caption_sign")
    private String captionSign;

    @JsonProperty("personnelSign")
    @ApiModelProperty(value = "港务人员签名")
    @TableField("personnel_sign")
    private String personnelSign;

    @JsonProperty("reviewDesc")
    @ApiModelProperty(value = "核验说明")
    @TableField("review_desc")
    private String reviewDesc;

    @JsonProperty("isAbnormal")
    @ApiModelProperty(value = "是否异常")
    @TableField("is_abnormal")
    private String isAbnormal;

    @JsonProperty("isLocal")
    @ApiModelProperty(value = "是否本地")
    @TableField("is_local")
    private Integer isLocal;

    @JsonProperty("reviewUserId")
    @ApiModelProperty(value = "审核人id")
    @TableField("review_user_id")
    private String reviewUserId;

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

    @JsonProperty("reviewUserName")
    @ApiModelProperty(value = "审核人")
    @TableField("review_user_name")
    private String reviewUserName;

    @JsonProperty("outTime")
    @ApiModelProperty(value = "拟出港时间")
    @TableField("out_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date outTime;

    @JsonProperty("estimatedArrivalPortAnchorageTime")
    @ApiModelProperty(value = "预计抵达码头所在锚地的时间")
    @TableField("estimated_arrival_port_anchorage_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date estimatedArrivalPortAnchorageTime;

    @ApiModelProperty(value = "船员ids")
    @TableField(value = "crew_ids")
    @JsonProperty("crewIds")
    private String crewIds;

    @ApiModelProperty(value = "持证情况 1齐全 0无")
    @JsonProperty("holdCertificate")
    @TableField("hold_certificate")
    private Integer holdCertificate;

    @ApiModelProperty(value = "渔船标识 1清楚 0不清楚")
    @JsonProperty("shipFlag")
    @TableField("ship_flag")
    private Integer shipFlag;

    @ApiModelProperty(value = "安防设施 1合格 0不合格")
    @JsonProperty("securityMeasures")
    @TableField("security_measures")
    private Integer securityMeasures;

    @ApiModelProperty(value = "网具标准 1合格 0不合格")
    @JsonProperty("standard")
    @TableField("standard")
    private Integer standard;

    @ApiModelProperty(value = "北斗设备状况 1开机 2关机 0无")
    @JsonProperty("bdStatus")
    @TableField("bd_status")
    private Integer bdStatus;

    @ApiModelProperty(value = "ais设备状况 1开机 2关机 0无")
    @JsonProperty("aisStatus")
    @TableField("ais_status")
    private Integer aisStatus;

    @JsonProperty("ActualEnterTime")
    @ApiModelProperty(value = "实际进港时间")
    @TableField("actual_enter_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date ActualEnterTime;

    @ApiModelProperty(value = "申请泊区ID")
    @JsonProperty("areaId")
    @TableField("area_id")
    private String areaId;

    @ApiModelProperty(value = "进港凭证")
    @JsonProperty("enterVoucher")
    @TableField("enter_voucher")
    private String enterVoucher;

    @ApiModelProperty(value = "船员列表")
    @JsonProperty("boatCrewList")
    @TableField(exist = false)
    private List<DsBoatCrew> boatCrewList;

    @ApiModelProperty(value = "船东名称")
    @JsonProperty("holderName")
    @TableField(value = "holder_name")
    private String holderName;

    @ApiModelProperty(value = "船东电话")
    @JsonProperty("holderPhone")
    @TableField(value = "holder_phone")
    private String holderPhone;

    @ApiModelProperty(value = "此停泊港口是否有泊区；0-没有，1-有")
    @JsonProperty("beHaveRegressPort")
    @TableField(value = "be_have_regress_port")
    private Integer beHaveRegressPort;

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

    @TableField(value = "regress_port_status")
    @ApiModelProperty(value = "归港指引状态")
    private Integer regressPortStatus;
}
