package com.ltgk.boat.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.ltgk.boat.domain.vo.BoatCertificateVO;
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;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ds_boat_data")
@ApiModel(value = "DsBoatData对象", description = "船舶信息")
public class DsBoatData {

    @TableId(value = "boat_id", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "渔船id")
    @JsonProperty("boatId")
    private String boatId;

    @ApiModelProperty(value = "地区code")
    @JsonProperty("areaCode")
    @TableField("area_code")
    private String areaCode;

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

    @ApiModelProperty(value = "渔船编码")
    @JsonProperty("boatCode")
    @TableField(value = "boat_code", condition = SqlCondition.LIKE)
    private String boatCode;

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

    @ApiModelProperty(value = "渔船名称英文")
    @JsonProperty("boatNameEn")
    @TableField(value = "boat_name_en", condition = SqlCondition.LIKE)
    private String boatNameEn;

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

    @ApiModelProperty(value = "型宽")
    @JsonProperty("width")
    @TableField("width")
    private BigDecimal width;

    @ApiModelProperty(value = "型深")
    @JsonProperty("height")
    @TableField("height")
    private BigDecimal height;

    @ApiModelProperty(value = "总吨位")
    @JsonProperty("tonnage")
    @TableField("tonnage")
    private BigDecimal tonnage;

    @ApiModelProperty(value = "净吨位")
    @JsonProperty("netTonnage")
    @TableField("net_tonnage")
    private BigDecimal netTonnage;

    @ApiModelProperty(value = "主机总功率")
    @JsonProperty("mainPower")
    @TableField("main_power")
    private BigDecimal mainPower;

    @ApiModelProperty(value = "主机型号一")
    @JsonProperty("mainTypeOne")
    @TableField("main_type_one")
    private String mainTypeOne;

    @ApiModelProperty(value = "主机型号二")
    @JsonProperty("mainTypeTwo")
    @TableField("main_type_two")
    private String mainTypeTwo;

    @ApiModelProperty(value = "主机型号三")
    @JsonProperty("mainTypeThree")
    @TableField("main_type_three")
    private String mainTypeThree;

    @ApiModelProperty(value = "主机功率一")
    @JsonProperty("mainPowerOne")
    @TableField("main_power_one")
    private BigDecimal mainPowerOne;

    @ApiModelProperty(value = "主机功率二")
    @JsonProperty("mainPowerTwo")
    @TableField("main_power_two")
    private BigDecimal mainPowerTwo;

    @ApiModelProperty(value = "主机功率三")
    @JsonProperty("mainPowerThree")
    @TableField("main_power_three")
    private BigDecimal mainPowerThree;

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

    @ApiModelProperty(value = "船体材质英文")
    @JsonProperty("boatMaterialEn")
    @TableField("boat_material_en")
    private String boatMaterialEn;

    @ApiModelProperty(value = "建造完工日期")
    @JsonProperty("buildDate")
    @TableField("build_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date buildDate;

    @ApiModelProperty(value = "建造完工日期开始")
    @JsonProperty("buildDateStart")
    @TableField("build_date_start")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private java.sql.Date buildDateStart;

    @ApiModelProperty(value = "建造完工日期结束")
    @JsonProperty("buildDateEnd")
    @TableField("build_date_end")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private java.sql.Date buildDateEnd;

    @ApiModelProperty(value = "主机数量")
    @JsonProperty("hostNum")
    @TableField("host_num")
    private BigDecimal hostNum;

    @ApiModelProperty(value = "船舶呼号识别码")
    @JsonProperty("boatCallCode")
    @TableField("boat_call_code")
    private String boatCallCode;

    @ApiModelProperty(value = "子船主机数量")
    @JsonProperty("sonHostNum")
    @TableField("son_host_num")
    private BigDecimal sonHostNum;

    @ApiModelProperty(value = "子船主机型号")
    @JsonProperty("sonType")
    @TableField("son_type")
    private String sonType;

    @ApiModelProperty(value = "子船船名")
    @JsonProperty("sonName")
    @TableField("son_name")
    private String sonName;

    @ApiModelProperty(value = "子船数量")
    @JsonProperty("sonNum")
    @TableField("son_num")
    private BigDecimal sonNum;

    @ApiModelProperty(value = "子船总功率")
    @JsonProperty("sonPower")
    @TableField("son_power")
    private BigDecimal sonPower;

    @ApiModelProperty(value = "海洋渔业捕捞许可证类别")
    @JsonProperty("fishingType")
    @TableField("fishing_type")
    private String fishingType;

    @ApiModelProperty(value = "船舶所有人名称")
    @JsonProperty("holderName")
    @TableField(value = "holder_name", condition = SqlCondition.LIKE, updateStrategy = FieldStrategy.IGNORED)
    private String holderName;

    @ApiModelProperty(value = "船舶所有人名称英文")
    @JsonProperty("holderNameEn")
    @TableField(value = "holder_name_en", updateStrategy = FieldStrategy.IGNORED)
    private String holderNameEn;

    @ApiModelProperty(value = "船舶所有人地址")
    @JsonProperty("holderAddress")
    @TableField(value = "holder_address", updateStrategy = FieldStrategy.IGNORED)
    private String holderAddress;

    @ApiModelProperty(value = "船舶所有人地址英文")
    @JsonProperty("holderAddressEn")
    @TableField(value = "holder_address_en", updateStrategy = FieldStrategy.IGNORED)
    private String holderAddressEn;

    @ApiModelProperty(value = "船舶所有人电话")
    @JsonProperty("holderPhone")
    @TableField(value = "holder_phone", updateStrategy = FieldStrategy.IGNORED)
    private String holderPhone;

    @ApiModelProperty(value = "船舶所有人 统一社会信用代码/公民身份号码")
    @JsonProperty("holderIdCard")
    @TableField(value = "holder_id_card", updateStrategy = FieldStrategy.IGNORED)
    private String holderIdCard;

    @ApiModelProperty(value = "船舶类型")
    @JsonProperty("boatType")
    @TableField(value = "boat_type", condition = SqlCondition.LIKE)
    private String boatType;

    @ApiModelProperty(value = "船舶类型英文")
    @JsonProperty("boatTypeEn")
    @TableField("boat_type_en")
    private String boatTypeEn;

    @ApiModelProperty(value = "主机机号一")
    @JsonProperty("mainMachineNumOne")
    @TableField("main_machine_num_one")
    private String mainMachineNumOne;

    @ApiModelProperty(value = "主机机号二")
    @JsonProperty("mainMachineNumTwo")
    @TableField("main_machine_num_two")
    private String mainMachineNumTwo;

    @ApiModelProperty(value = "主机机号三")
    @JsonProperty("mainMachineNumThree")
    @TableField("main_machine_num_three")
    private String mainMachineNumThree;

    @ApiModelProperty(value = "船网工具指标批准书编号")
    @JsonProperty("networkApprovalNum")
    @TableField("network_approval_num")
    private String networkApprovalNum;

    @ApiModelProperty(value = "双控功率")
    @JsonProperty("dualControlPower")
    @TableField("dual_control_power")
    private BigDecimal dualControlPower;

    @ApiModelProperty(value = "核准船长")
    @JsonProperty("approvalLength")
    @TableField("approval_length")
    private BigDecimal approvalLength;

    @ApiModelProperty(value = "核准总吨")
    @JsonProperty("approvalTonnage")
    @TableField("approval_tonnage")
    private BigDecimal approvalTonnage;

    @ApiModelProperty(value = "删除标记")
    @JsonProperty("delFlag")
    @TableField("del_flag")
    private Integer delFlag;

    @ApiModelProperty(value = "编辑人")
    @JsonProperty("createBy")
    @TableField("create_by")
    private String createBy;

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

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

    @ApiModelProperty(value = "是否是本地渔船：0是，1外省")
    @JsonProperty("isLocal")
    @TableField("is_local")
    private Integer isLocal;

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

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

    @ApiModelProperty(value = "实际经营人系统用户id")
    @JsonProperty("operatorUserId")
    @TableField(value = "operator_user_id", updateStrategy = FieldStrategy.IGNORED)
    private String operatorUserId;

    @ApiModelProperty(value = "实际经营人名称")
    @JsonProperty("operatorName")
    @TableField(value = "operator_name", updateStrategy = FieldStrategy.IGNORED)
    private String operatorName;

    @ApiModelProperty(value = "实际经营人电话")
    @JsonProperty("operatorPhone")
    @TableField(value = "operator_phone", updateStrategy = FieldStrategy.IGNORED)
    private String operatorPhone;

    @ApiModelProperty(value = "实际经营人身份证号/统一社会信用代码")
    @JsonProperty("operatorIdCard")
    @TableField(value = "operator_id_card", updateStrategy = FieldStrategy.IGNORED)
    private String operatorIdCard;

    @ApiModelProperty(value = "在线状态/渔船状态")
    @JsonProperty("lineType")
    @TableField(exist = false)
    private String lineType;

    @ApiModelProperty(value = "最后更新时间")
    @JsonProperty("gpsTime")
    @TableField(exist = false)
    private String gpsTime;

    @ApiModelProperty(value = "绑定母港id")
    @JsonProperty("homePortId")
    @TableField(exist = false)
    private String homePortId;

    @ApiModelProperty(value = "绑定母港名称")
    @JsonProperty("homePortName")
    @TableField(exist = false)
    private String homePortName;

    @ApiModelProperty(value = "绑定母港时间")
    @JsonProperty("homePortBuildTime")
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date homePortBuildTime;

    @ApiModelProperty(value = "渔业捕捞许可证编号")
    @JsonProperty("fishingCode")
    @TableField(exist = false)
    private String fishingCode;

    @ApiModelProperty(value = "主作业类型")
    @JsonProperty("mainWorkType")
    @TableField(exist = false)
    private String mainWorkType;

    @ApiModelProperty(value = "兼作业类型")
    @JsonProperty("doubleWorkType")
    @TableField(exist = false)
    private String doubleWorkType;

    @ApiModelProperty(value = "船籍港 -> 跟母港无关")
    @JsonProperty("homePort")
    @TableField(exist = false)
    private String homePort;

    @ApiModelProperty(value = "AIS 主键")
    @JsonProperty("aisId")
    @TableField(exist = false)
    private String aisId;

    @ApiModelProperty(value = "Beidou 主键")
    @JsonProperty("beidouId")
    @TableField(exist = false)
    private String beidouId;

    @ApiModelProperty(value = "AIS 终端号")
    @JsonProperty("aisCode")
    @TableField(exist = false)
    private String aisCode;

    @ApiModelProperty(value = "Beidou 终端号")
    @JsonProperty("beidouCode")
    @TableField(exist = false)
    private String beidouCode;

    @ApiModelProperty(value = "终端号 -- 现阶段使用AIS 终端号")
    @JsonProperty("terminalCode")
    @TableField(exist = false)
    private String terminalCode;

    @ApiModelProperty(value = "渔船证书列表")
    @JsonProperty("boatCertificateList")
    @TableField(exist = false)
    private List<BoatCertificateVO> boatCertificateList;
}
