package org.springblade.modules.app.common.dto;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.wn.common.datamodel.BaseDTO;
import com.wn.common.datamodel.Long2StringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

/**
 * @author huyinuo
 */
@Data
@ApiModel(value = "ContractDTO", description = "合同信息")
public class ContractDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    /**
     * 合同编码
     */
    @ApiModelProperty(name = "contractCode", value = "合同编码")
    private String contractCode;

    /**
     * 合同名称
     */
    @ApiModelProperty(name = "contractName", value = "合同名称")
    private String contractName;

    /**
     * 状态 0-待确认 1-已生效 -1-已驳回 -2-已失效
     */
    @ApiModelProperty(name = "state", value = "状态 0-待确认 1-已生效 -1-已驳回 -2-已失效")
    private Integer state;

    /**
     * 创建时间
     */
    @ApiModelProperty(name = "createdTime", value = "创建时间")
    private Date createdTime;

    /**
     * 养殖场id
     */
    @JsonSerialize(using = Long2StringSerializer.class)
    @ApiModelProperty(name = "salerUserId", value = "养殖场id")
    private Long salerUserId;

    /**
     * 养殖场名称
     */
    @ApiModelProperty(name = "salerUserName", value = "养殖场名称")
    private String salerUserName;

    /**
     * 养殖场地址
     */
    @ApiModelProperty(name = "salerUserAddress", value = "养殖场地址")
    private String salerUserAddress;

    /**
     * 养殖场信用代码
     */
    @ApiModelProperty(name = "salerCreditCode", value = "养殖场信用代码")
    private String salerCreditCode;

    /**
     * 屠宰场id
     */
    @JsonSerialize(using = Long2StringSerializer.class)
    @ApiModelProperty(name = "buyerUserId", value = "屠宰场id")
    private Long buyerUserId;

    /**
     * 屠宰场名称
     */
    @ApiModelProperty(name = "buyerUserName", value = "屠宰场名称")
    private String buyerUserName;

    /**
     * 屠宰场地址
     */
    @ApiModelProperty(name = "buyerUserAddress", value = "屠宰场地址")
    private String buyerUserAddress;

    /**
     * 屠宰场信用代码
     */
    @ApiModelProperty(name = "buyerCreditCode", value = "屠宰场信用代码")
    private String buyerCreditCode;

    /**
     * 合同到期时间
     */
    @ApiModelProperty(name = "contractExpiryTime", value = "合同到期时间")
    private Date contractExpiryTime;

    /**
     * 屠宰场三年无疫情证明
     */
    @ApiModelProperty(name = "noEpidemicProofUrl", value = "屠宰场三年无疫情证明")
    private String noEpidemicProofUrl;

    /**
     * 合同附件
     */
    @ApiModelProperty(name = "contractEnclosureUrl", value = "合同附件")
    private String contractEnclosureUrl;

    private String token;
}
