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.common.validation.groups.Update;
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 javax.validation.constraints.NotBlank;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

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

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @NotBlank(message = "渔船出港信息主键不能为空！", groups = {Update.class})
    @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("outTime")
    @ApiModelProperty(value = "出港时间")
    @TableField("out_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date outTime;

    @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("status")
    @ApiModelProperty(value = "状态:0=未审核，1=审核通过，2=拒绝")
    @TableField("status")
    private Integer status;

    @JsonProperty("lifeRaftsNum")
    @ApiModelProperty(value = "救生筏数量")
    @TableField("life_rafts_num")
    private Integer lifeRaftsNum;

    @JsonProperty("fireExtinguishersNum")
    @ApiModelProperty(value = "灭火器数量")
    @TableField("fire_extinguishers_num")
    private Integer fireExtinguishersNum;

    @JsonProperty("lifeJacketsNum")
    @ApiModelProperty(value = "救生衣数量")
    @TableField("life_jackets_num")
    private Integer lifeJacketsNum;

    @JsonProperty("lifebuoysNum")
    @ApiModelProperty(value = "救生圈数量")
    @TableField("lifebuoys_num")
    private Integer lifebuoysNum;

    @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 = "是否本地 0本地 1外地")
    @TableField("is_local")
    private Integer isLocal = 0;

    @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;

    @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 = "持证情况照片")
    @JsonProperty("holdCertificateUrl")
    @TableField("hold_certificate_url")
    private String holdCertificateUrl;

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

    @ApiModelProperty(value = "渔船标识照片")
    @JsonProperty("shipFlagUrl")
    @TableField("ship_flag_url")
    private String shipFlagUrl;

    @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 = "北斗设备状况照片")
    @JsonProperty("bdStatusUrl")
    @TableField("bd_status_url")
    private String bdStatusUrl;

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

    @ApiModelProperty(value = "ais设备状况照片")
    @JsonProperty("aisStatusUrl")
    @TableField("ais_status_url")
    private String aisStatusUrl;

    @ApiModelProperty(value = "救生筏状况 1有 0无")
    @TableField("life_rafts_status")
    @JsonProperty("lifeRaftsStatus")
    private Integer lifeRaftsStatus;

    @ApiModelProperty(value = "灭火器状况 1有 0无")
    @TableField("fire_extinguishers_status")
    @JsonProperty("fireExtinguishersStatus")
    private Integer fireExtinguishersStatus;

    @ApiModelProperty(value = "救生衣状况 1有 0无")
    @TableField("life_jackets_status")
    @JsonProperty("lifeJacketsStatus")
    private Integer lifeJacketsStatus;

    @ApiModelProperty(value = "救生圈状况 1有 0无")
    @TableField("lifebuoys_status")
    @JsonProperty("lifebuoysStatus")
    private Integer lifebuoysStatus;

    @ApiModelProperty(value = "救生消防情况照片URL")
    @TableField("lifesaving_firefighting_url")
    @JsonProperty("lifesavingFirefightingUrl")
    private String lifesavingFirefightingUrl;

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

    @JsonProperty("planWorkArea")
    @ApiModelProperty(value = "计划作业渔区")
    @TableField("plan_work_area")
    private String planWorkArea;

    @ApiModelProperty(value = "渔船号灯号型：是否正常，1是0否")
    @TableField("lamp_status")
    @JsonProperty("lampStatus")
    private Integer lampStatus;

    @ApiModelProperty(value = "渔船号灯号型照片")
    @TableField("lamp_status_url")
    @JsonProperty("lampStatusUrl")
    private String lampStatusUrl;

    @ApiModelProperty(value = "渔船保险是否正常：1-是，0-否")
    @TableField("boat_insurance_status")
    @JsonProperty("boatInsuranceStatus")
    private Integer boatInsuranceStatus;

    @ApiModelProperty(value = "渔船保险照片")
    @TableField("boat_insurance_status_url")
    @JsonProperty("boatInsuranceStatusUrl")
    private String boatInsuranceStatusUrl;

    @ApiModelProperty(value = "渔船安全检查是否正常：1-是，0-否")
    @TableField("boat_safe_status")
    @JsonProperty("boatSafeStatus")
    private Integer boatSafeStatus;

    @ApiModelProperty(value = "渔船安全检查照片")
    @TableField("boat_safe_status_url")
    @JsonProperty("boatSafeStatusUrl")
    private String boatSafeStatusUrl;

    @ApiModelProperty(value = "渔船执法安全检查是否正常：1-是，0-否")
    @TableField("boat_law_enforcement_safe")
    @JsonProperty("boatLawEnforcementSafe")
    private Integer boatLawEnforcementSafe;

    @ApiModelProperty(value = "渔船执法安全检查照片")
    @TableField("boat_law_enforcement_safe_url")
    @JsonProperty("boatLawEnforcementSafeUrl")
    private String boatLawEnforcementSafeUrl;

    @ApiModelProperty(value = "检查照片url")
    @TableField("check_url")
    @JsonProperty("checkUrl")
    private String checkUrl;

    @ApiModelProperty(value = "船籍-外地渔船使用")
    @TableField(value = "home_port", condition = SqlCondition.LIKE)
    @JsonProperty("homePort")
    private String homePort;

    @ApiModelProperty(value = "出港凭证")
    @JsonProperty("outVoucher")
    @TableField("out_voucher")
    private String outVoucher;

    @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;

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