package com.aircraft.modules.aircraft.domain;

import com.aircraft.base.BaseEntity;
import com.aircraft.domain.dto.AttachmentMaterialDTO;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * <p>
 * 飞行器保险表
 * </p>
 *
 * @author cli
 * @since 2025-07-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("fms_ac_aircraft_insurance")
public class AircraftInsurance extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @NotNull(groups = BaseEntity.Update.class)
    @ApiModelProperty(value = "主键id")
    private Long id;

    /**
     * 飞行器id
     */
    @NotNull
    @ApiModelProperty(value = "飞行器id")
    private Long aircraftId;

    /**
     * 保险名称
     */
    @NotBlank
    @ApiModelProperty(value = "保险名称")
    private String name;

    /**
     * 保险类型：0-三方险，1-设备险，2-运营险
     */
    @NotNull
    @ApiModelProperty(value = "保险类型：0-三方险，1-设备险，2-运营险")
    private Integer insuranceType;

    /**
     * 截止日期
     */
    @NotNull
    @ApiModelProperty(value = "截止日期")
    private Date deadlineTime;



    /**
     * 保险附件
     */
    @NotNull
    @TableField(exist = false)
    @ApiModelProperty(value = "保险附件")
    private List<AttachmentMaterialDTO> insuranceAttachment;


}
