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 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_boat_insurance")
@ApiModel(value = "DsBoatInsurance对象", description = "船舶保险信息表")
public class DsBoatInsurance extends Model<DsBoatInsurance> {

    private static final long serialVersionUID = 1L;

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

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

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

    @ApiModelProperty(value = "保险类型（船舶建造保险、船舶修理保险、船舶修理费用保险）")
    @TableField("insurance_type")
    private String insuranceType;

    @ApiModelProperty(value = "保险编号")
    @TableField(value = "insurance_code", condition = SqlCondition.LIKE)
    private String insuranceCode;

    @ApiModelProperty(value = "保险公司")
    @TableField("insurance_company")
    private String insuranceCompany;

    @ApiModelProperty(value = "保险状态状态（保单待承保、保单有效、保单中止、保单过期）")
    @TableField("insurance_status")
    private String insuranceStatus;

    @ApiModelProperty(value = "签发日期")
    @TableField("issue_date")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private java.sql.Date issueDate;

    @ApiModelProperty(value = "保险生效时间")
    @TableField("insurance_start_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date insuranceStartTime;


    @ApiModelProperty(value = "保险截止时间")
    @TableField("insurance_end_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date insuranceEndTime;

    @ApiModelProperty(value = "总保险金额")
    @TableField("total_insurance_amount")
    private String totalInsuranceAmount;

    @ApiModelProperty(value = "保险费总数")
    @TableField("total_insurance_premiums")
    private String totalInsurancePremiums;


    @ApiModelProperty(value = "投保人")
    @TableField("insurance_holder")
    private String insuranceHolder;

    @ApiModelProperty(value = "投保人联系方式")
    @TableField("holder_phone")
    private String holderPhone;

    @ApiModelProperty(value = "保险受益人")
    @TableField("insurance_beneficiary")
    private String insuranceBeneficiary;

    @ApiModelProperty(value = "保险受益人联系方式")
    @TableField("beneficiary_phone")
    private String beneficiaryPhone;


    @ApiModelProperty(value = "保险图片")
    @TableField("picture")
    private String picture;

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

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

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