package com.ltgk.crew.domain.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ltgk.common.core.page.BasePage;
import com.ltgk.common.validation.groups.Add;
import com.ltgk.common.validation.groups.Detail;
import com.ltgk.common.validation.groups.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 船员保险信息表
 *
 * @author Qi ChengBin
 * @date 2024/12/02 14:59:04
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "船员保险查询对象", description = "船员保险查询对象")
public class DsCrewInsuranceDTO extends BasePage {
    @ApiModelProperty(value = "船员保险主键")
    @NotNull(message = "船员保险主键不能为空", groups = {Update.class, Detail.class})
    private String id;

    @ApiModelProperty(value = "船员ID")
    @NotNull(message = "船员主键不能为空", groups = {Update.class, Add.class})
    private String crewId;

    @ApiModelProperty(value = "船员姓名")
    @NotNull(message = "船员名称不能为空！", groups = {Update.class, Add.class})
    private String crewName;

    @ApiModelProperty(value = "保险类型")
    private String insuranceType;

    @ApiModelProperty(value = "保险编号")
    private String insuranceCode;

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

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

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

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

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

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

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

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

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

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

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

    @ApiModelProperty(value = "开始时间")
    private String startTime;

    @ApiModelProperty(value = "结束时间")
    private String endTime;
}
