package com.prolog.rdc.tms.app.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;

/**
 * 运单异常表
 *
 * @author zhangsj
 * @since 2022-03-30 14:33:19
 */
@Data
@Table("tms_shipbill_abnormal")
public class TmsShipbillAbnormalModel implements Serializable {

	private static final long serialVersionUID = 690310347537308832L;

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

	@ApiModelProperty(value = "运单ID")
	@Column(value = "shipbill_id")
	private String shipbillId;

	@ApiModelProperty(value = "运单编号")
	@Column(value = "shipbill_no")
	private String shipbillNo;

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@ApiModelProperty(value = "异常发生时间")
	@Column(value = "abnormal_time")
	private Date abnormalTime;

	@ApiModelProperty(value = "异常类型 数据字典 ABNORMAL_TYPE：10货物异常 20单据异常")
	@Column(value = "abnormal_type")
	private Integer abnormalType;

	@ApiModelProperty(value = "异常状态 数据字典 ABNORMAL_STATUS：0未异常 10异常 20异常关闭")
	@Column(value = "abnormal_status")
	private Integer abnormalStatus;

	@ApiModelProperty(value = "异常事件 数据字典 ABNORMAL_EVENT：10货物缺失 20货物破损")
	@Column(value = "abnormal_event")
	private Integer abnormalEvent;

	@ApiModelProperty(value = "客户投诉")
	@Column(value = "abnormal_complain")
	private Integer abnormalComplain;

	@ApiModelProperty(value = "异常内容")
	@Column(value = "abnormal_content")
	private String abnormalContent;

	@ApiModelProperty(value = "异常图片")
	@Column(value = "abnormal_photo")
	private String abnormalPhoto;

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@ApiModelProperty(value = "异常关闭时间")
	@Column(value = "abnormal_close_time")
	private Date abnormalCloseTime;

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

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

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

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

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

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