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 com.ltgk.common.annotation.Excel;
import com.ltgk.common.validation.groups.Add;
import com.ltgk.common.validation.groups.Update;
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 javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * 港区服务管理-预约加油/冰/水记录对象 ds_port_service_appointment
 *
 * @author Qi ChengBin
 * @date 2025-01-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ds_port_service_appointment")
@ApiModel(value = "港区服务管理-预约加油/冰/水记录对象", description = "港区服务管理-预约加油/冰/水记录表")
public class DsPortServiceAppointment extends Model<DsPortServiceAppointment> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "港区服务管理-预约加油/冰/水记录主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @NotBlank(message = "主键不能为空", groups = {Update.class})
    private String id;

    @ApiModelProperty(value = "渔港ID")
    @TableField(value = "port_id")
    @NotBlank(message = "鱼港名称不能为空！", groups = {Add.class, Update.class})
    private String portId;

    @ApiModelProperty(value = "渔港名称")
    @TableField(value = "port_name", condition = SqlCondition.LIKE)
    @Excel(name = "渔港名称", width = 25, height = 18)
    @NotBlank(message = "鱼港名称不能为空！", groups = {Add.class, Update.class})
    private String portName;

    @ApiModelProperty(value = "渔船ID")
    @TableField(value = "boat_id")
    @NotBlank(message = "渔船名称不能为空", groups = {Add.class, Update.class})
    private String boatId;

    @ApiModelProperty(value = "渔船名称")
    @TableField(value = "boat_name", condition = SqlCondition.LIKE)
    @Excel(name = "渔船名称", width = 25, height = 18)
    @NotBlank(message = "渔船名称不能为空", groups = {Add.class, Update.class})
    private String boatName;

    @ApiModelProperty(value = "店铺ID")
    @TableField(value = "store_id")
    @NotBlank(message = "店铺名称不能为空", groups = {Add.class, Update.class})
    private String storeId;

    @ApiModelProperty(value = "店铺名称")
    @TableField(value = "store_name", condition = SqlCondition.LIKE)
    @Excel(name = "店铺名称", width = 25, height = 18)
    @NotBlank(message = "店铺名称不能为空", groups = {Add.class, Update.class})
    private String storeName;

    @ApiModelProperty(value = "预约人主键")
    @TableField(value = "service_appointment_user_id")
    private String serviceAppointmentUserId;

    @ApiModelProperty(value = "预约人姓名")
    @TableField(value = "service_appointment_user", condition = SqlCondition.LIKE)
    @Excel(name = "预约人姓名", width = 25, height = 18)
    private String serviceAppointmentUser;

    @ApiModelProperty(value = "预约人联系方式")
    @TableField(value = "service_appointment_user_tel", condition = SqlCondition.LIKE)
    @Excel(name = "预约人联系方式", width = 25, height = 18)
    @NotBlank(message = "预约人联系方式不能为空！", groups = {Update.class, Add.class})
    @Pattern(regexp = "^$|1[3-9]\\d{9}$", message = "预约人联系方式格式不正确！", groups = {Update.class, Add.class})
    private String serviceAppointmentUserTel;

    @ApiModelProperty(value = "预约类型【预约加油、预约加冰、预约加水】")
    @TableField(value = "service_appointment_type", condition = SqlCondition.LIKE)
    private String serviceAppointmentType;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "预约开始时间")
    @TableField(value = "service_appointment_start_time")
    @Excel(name = "预约开始时间", width = 25, height = 18, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date serviceAppointmentStartTime;

    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(value = "预约结束时间")
    @TableField(value = "service_appointment_end_time")
    @Excel(name = "预约结束时间", width = 25, height = 18, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date serviceAppointmentEndTime;

    @ApiModelProperty(value = "预约内容")
    @TableField(value = "service_appointment_content", condition = SqlCondition.LIKE)
    @Excel(name = "预约内容", width = 50, height = 18)
    private String serviceAppointmentContent;

    @ApiModelProperty(value = "评价内容")
    @TableField(value = "service_appointment_evaluation_content", condition = SqlCondition.LIKE)
    @Excel(name = "评价内容", width = 50, height = 18)
    private String serviceAppointmentEvaluationContent;

    @ApiModelProperty(value = "预约状态：0 - 已预约，1-已完成，2-已过期，3-已取消，4-已评价")
    @TableField(value = "service_appointment_state")
    @Excel(name = "预约状态", width = 25, height = 18, readConverterExp = "0=已预约,1=已完成,2=已过期,3=已取消,4-已评价")
    private Integer serviceAppointmentState;

    @ApiModelProperty(value = "预留字段1")
    @TableField(value = "obligate_file_1")
    private String obligateFile1;

    @ApiModelProperty(value = "预留字段2")
    @TableField(value = "obligate_file_2")
    private String obligateFile2;

    @ApiModelProperty(value = "预留字段3")
    @TableField(value = "obligate_file_3")
    private String obligateFile3;

    @ApiModelProperty(value = "预留字段4")
    @TableField(value = "obligate_file_4")
    private String obligateFile4;

    @ApiModelProperty(value = "预留字段5")
    @TableField(value = "obligate_file_5")
    private String obligateFile5;

    @ApiModelProperty(value = "预留字段6")
    @TableField(value = "obligate_file_6")
    private String obligateFile6;

    @ApiModelProperty(value = "预留字段7")
    @TableField(value = "obligate_file_7")
    private String obligateFile7;

    @ApiModelProperty(value = "预留字段8")
    @TableField(value = "obligate_file_8")
    private String obligateFile8;

    @ApiModelProperty(value = "预留字段9")
    @TableField(value = "obligate_file_9")
    private String obligateFile9;

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

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

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

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

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