package com.prolog.rdc.tms.model.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.prolog.framework.core.annotation.Column;
import com.prolog.framework.core.annotation.Id;
import com.prolog.framework.core.annotation.Table;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@Table("tms_business_flow_condition")
public class TmsBusinFlowConditionModel implements Serializable {
    private static final long serialVersionUID = 291523622262615154L;

    @Id
    @ApiModelProperty(value = "ID 主键")
    @Column(value = "id")
    private Long id;

    @ApiModelProperty(value = "业务流程ID")
    @Column(value = "business_flow_id")
    private Long businessFlowId;

    @ApiModelProperty(value = "流程条件类型 数据字典 FLOW_CONDITION_TYPE 1配送方式 2发货方类型 3收货方类型 4订单类型 5订单业务类型 6运输模式 7温度要求 8货主")
    @Column(value = "flow_condition_type")
    private Integer flowConditionType;

    @ApiModelProperty(value = "流程条件对应的值  流程条件是配送方式 ：1配送 2自提 流程条件是收/发货方类型：1客户 2仓库 3供应商")
    @Column(value = "flow_condition_value")
    private String flowConditionValue;

    @ApiModelProperty(value = "单位ID  单位ID1,单位ID2")
    @Column(value = "unit_id")
    private String unitId;

    @ApiModelProperty(value = "单位编码 单位编码1,单位编码2")
    @Column(value = "unit_code")
    private String unitCode;

    @ApiModelProperty(value = "单位名称 单位名称1,单位名称2")
    @Column(value = "unit_name")
    private String unitName;

    @ApiModelProperty(value = "企业ID")
    @Column(value = "enterprise_id")
    private Long enterpriseId;

    @ApiModelProperty(value = "企业名称")
    @Column(value = "enterprise_name")
    private String enterpriseName;

    @ApiModelProperty(value = "创建时间")
    @Column(value = "createtime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createtime;

    @ApiModelProperty(value = "创建人")
    @Column(value = "createperson")
    private String createperson;

    @ApiModelProperty(value = "修改时间")
    @Column(value = "updatetime")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatetime;

    @ApiModelProperty(value = "修改人")
    @Column(value = "updateperson")
    private String updateperson;

    @ApiModelProperty(value = "流程条件类别  数据字典flow_condition_category 10满足条件 20排除条件")
    @Column(value = "flow_condition_category")
    private Integer flowConditionCategory;

}
