package shop.alien.entity.store;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 合同表
 *
 * @author alien
 * @since 2025-01-XX
 */
@Data
@JsonInclude
@EqualsAndHashCode(callSuper = false)
@TableName("store_contract")
@ApiModel(value = "StoreContract对象", description = "合同表")
public class StoreContract extends Model<StoreContract> {

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

    @ApiModelProperty(value = "店铺ID")
    @TableField("store_id")
    private Long storeId;

    @ApiModelProperty(value = "商家店铺名称")
    @TableField("store_name")
    private String storeName;

    @ApiModelProperty(value = "经营板块")
    @TableField("business_segment")
    private String businessSegment;

    @ApiModelProperty(value = "商家姓名")
    @TableField("merchant_name")
    private String merchantName;

    @ApiModelProperty(value = "联系电话")
    @TableField("contact_phone")
    private String contactPhone;

    @ApiModelProperty(value = "签署状态(已签署,未签署,已到期)")
    @TableField("signing_status")
    private String signingStatus;

    @ApiModelProperty(value = "合同URL")
    @TableField("contract_url")
    private String contractUrl;

    @ApiModelProperty(value = "印章URL")
    @TableField("seal_url")
    private String sealUrl;

    @ApiModelProperty(value = "签署时间")
    @TableField("signing_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date signingTime;

    @ApiModelProperty(value = "生效时间")
    @TableField("effective_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date effectiveTime;

    @ApiModelProperty(value = "到期时间")
    @TableField("expiry_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date expiryTime;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "created_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedTime;

    @ApiModelProperty(value = "删除标识, 0:未删除, 1:已删除")
    @TableField("delete_flag")
    @TableLogic
    private Integer deleteFlag;
}

