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;

/**
 * 合同包表 contract_bundle
 */
@Data
@JsonInclude
@EqualsAndHashCode(callSuper = false)
@TableName("contract_bundle")
@ApiModel(value = "ContractBundle对象", description = "合同包表")
public class ContractBundle extends Model<ContractBundle> {

    @ApiModelProperty(value = "合同包唯一标识")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "签约主体类型(store/lawyer)")
    @TableField("subject_type")
    private String subjectType;

    @ApiModelProperty(value = "签约主体ID，门店/律师业务主键")
    @TableField("subject_id")
    private Long subjectId;

    @ApiModelProperty(value = "签约主体名称")
    @TableField("subject_name")
    private String subjectName;

    @ApiModelProperty(value = "业务板块")
    @TableField("business_segment")
    private String businessSegment;

    @ApiModelProperty(value = "联系人姓名")
    @TableField("contact_name")
    private String contactName;

    @ApiModelProperty(value = "联系人手机号")
    @TableField("contact_phone")
    private String contactPhone;

    @ApiModelProperty(value = "组织标识(统一社会信用代码)")
    @TableField("ord_id")
    private String ordId;

    @ApiModelProperty(value = "合同包类型(STORE_STANDARD/LAWYER_STANDARD)")
    @TableField("bundle_type")
    private String bundleType;

    @ApiModelProperty(value = "整体状态: 未签署/审核中/已签署")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "主合同文档ID")
    @TableField("primary_document_id")
    private Long primaryDocumentId;

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