package com.ltgk.port.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
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.util.Date;

/**
 * <p>
 * 船舶年检记录表
 * </p>
 *
 * @author songzh
 * @since 2022-06-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("ds_annual_inspection")
@ApiModel(value = "DsAnnualInspection对象", description = "船舶年检记录表")
public class DsAnnualInspection extends Model<DsAnnualInspection> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

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

    @ApiModelProperty(value = "检查状态：0=未年检，1=年检通过，2年检不通过")
    @TableField("check_status")
    private Integer checkStatus;

    @ApiModelProperty(value = "船东姓名")
    @TableField("boat_owner")
    private String boatOwner;

    @ApiModelProperty(value = "船东电话")
    @TableField("owner_phone")
    private String ownerPhone;

    @ApiModelProperty(value = "检查时间")
    @TableField("check_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date checkTime;

    @ApiModelProperty(value = "检验单位")
    @TableField("check_unit")
    private String checkUnit;

    @ApiModelProperty(value = "检验人")
    @TableField("check_person")
    private String checkPerson;

    @ApiModelProperty(value = "有效期至")
    @TableField("valid_until")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date validUntil;

    @ApiModelProperty(value = "合格标志号")
    @TableField("mark_num")
    private String markNum;

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

    @ApiModelProperty(value = "创建日期")
    @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 = "编辑人")
    @TableField("update_by")
    private String updateBy;

    @ApiModelProperty(value = "编辑日期")
    @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 = "删除标志")
    @TableField("del_flag")
    private Integer delFlag;

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

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

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