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.ltgk.common.validation.groups.Detail;
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_bind_crew
 *
 * @author Qi ChengBin
 * @date 2024-12-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ds_boat_bind_crew")
@ApiModel(value = "渔船绑定船员对象", description = "渔船绑定船员表")
public class DsBoatBindCrew extends Model<DsBoatBindCrew> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @NotBlank(message = "主键不能为空！", groups = Detail.class)
    private String id;

    @ApiModelProperty(value = "船名号1")
    @TableField(value = "boat_name1")
    private String boatName1;

    @ApiModelProperty(value = "船名号2")
    @TableField(value = "boat_name2")
    private String boatName2;

    @ApiModelProperty(value = "渔船所有人电话")
    @TableField(value = "owner_phone")
    private String ownerPhone;

    @ApiModelProperty(value = "船员id")
    @TableField(value = "crew_id")
    private String crewId;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "绑定时间")
    @TableField(value = "bind_time")
    private Date bindTime;

    @ApiModelProperty(value = "船员名")
    @TableField(value = "crew_name", condition = SqlCondition.LIKE)
    private String crewName;

    @ApiModelProperty(value = "身份证号")
    @TableField(value = "crew_idcard")
    private String crewIdcard;

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

    @ApiModelProperty(value = "船员手机号")
    @TableField(value = "crew_phone")
    private String crewPhone;

    @ApiModelProperty(value = "船员职务")
    @TableField(value = "crew_position")
    private String crewPosition;

    @ApiModelProperty(value = "参保情况")
    @TableField(value = "crew_insured")
    private String crewInsured;

    @ApiModelProperty(value = "船东船长账号")
    @TableField(value = "owner_username")
    private String ownerUsername;

    @ApiModelProperty(value = "是否参保")
    @TableField(value = "insured")
    private String insured;

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

}
