package com.qmth.sop.business.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.sop.common.base.BaseEntity;
import com.qmth.sop.common.enums.DeviceDeliveryStatusEnum;
import com.qmth.sop.common.enums.DeviceUsageTypeEnum;
import com.qmth.sop.common.enums.InOutTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 设备发货表
 * </p>
 *
 * @author wangliang
 * @since 2023-11-28
 */
@ApiModel(value = "TBDeviceDelivery对象", description = "设备发货表")
public class TBDeviceDelivery extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "服务单元id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long serviceId;

    @ApiModelProperty(value = "crm单号")
    private String crmNo;

    @ApiModelProperty(value = "sop单号")
    private String sopNo;

    @ApiModelProperty(value = "设备序列号")
    private String serialNo;

    @ApiModelProperty(value = "用途类型，PROJECT：项目，OTHER：其它")
    private DeviceUsageTypeEnum usageType;

    @ApiModelProperty(value = "供应商id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long supplierId;

    @ApiModelProperty(value = "数量")
    private Integer num;

    @ApiModelProperty(value = "邮寄地址")
    @NotNull(message = "邮寄地址地址不能为空")
    private String mailingAddress;

    @ApiModelProperty(value = "收件人")
    @NotNull(message = "收件人不能为空")
    private String consignee;

    @ApiModelProperty(value = "收件人联系电话")
    @NotNull(message = "收件人联系电话不能为空")
    private String consigneePhone;

    @ApiModelProperty(value = "快递单号")
    @NotNull(message = "快递单号不能为空")
    private String expressNo;

    @ApiModelProperty(value = "快递单拍照")
    private String expressPhotoPath;

    @ApiModelProperty(value = "发货类型（出入库类型）")
    private InOutTypeEnum deliveryType;

    @ApiModelProperty(value = "状态，UN_DELIVER：待发货，DELIVER：已发货，RECEIVE：已签收，CANCEL：作废")
    private DeviceDeliveryStatusEnum status;

    @ApiModelProperty(value = "发货时间")
    private Long deliverTime;

    @ApiModelProperty(value = "发货人id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long deliverUserId;

    @ApiModelProperty(value = "签收时间")
    private Long receiveTime;

    @ApiModelProperty(value = "签收人id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long receiveUserId;

    @ApiModelProperty(value = "是否启用，0：停用，1：启用")
    private Boolean enable;

    @ApiModelProperty(value = "有效的可操作的发货记录（当一个设备处于一个发货出入库生命周期时为有效）, 0: 无效，1: 有效")
    private Boolean effect;

    public String getExpressNo() {
        return expressNo;
    }

    public void setExpressNo(String expressNo) {
        this.expressNo = expressNo;
    }

    public Long getServiceId() {
        return serviceId;
    }

    public void setServiceId(Long serviceId) {
        this.serviceId = serviceId;
    }

    public String getCrmNo() {
        return crmNo;
    }

    public void setCrmNo(String crmNo) {
        this.crmNo = crmNo;
    }

    public String getSopNo() {
        return sopNo;
    }

    public void setSopNo(String sopNo) {
        this.sopNo = sopNo;
    }

    public String getSerialNo() {
        return serialNo;
    }

    public void setSerialNo(String serialNo) {
        this.serialNo = serialNo;
    }

    public DeviceUsageTypeEnum getUsageType() {
        return usageType;
    }

    public void setUsageType(DeviceUsageTypeEnum usageType) {
        this.usageType = usageType;
    }

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public String getMailingAddress() {
        return mailingAddress;
    }

    public void setMailingAddress(String mailingAddress) {
        this.mailingAddress = mailingAddress;
    }

    public String getConsignee() {
        return consignee;
    }

    public void setConsignee(String consignee) {
        this.consignee = consignee;
    }

    public String getConsigneePhone() {
        return consigneePhone;
    }

    public void setConsigneePhone(String consigneePhone) {
        this.consigneePhone = consigneePhone;
    }

    public String getExpressPhotoPath() {
        return expressPhotoPath;
    }

    public void setExpressPhotoPath(String expressPhotoPath) {
        this.expressPhotoPath = expressPhotoPath;
    }

    public DeviceDeliveryStatusEnum getStatus() {
        return status;
    }

    public void setStatus(DeviceDeliveryStatusEnum status) {
        this.status = status;
    }

    public Long getDeliverTime() {
        return deliverTime;
    }

    public void setDeliverTime(Long deliverTime) {
        this.deliverTime = deliverTime;
    }

    public Long getDeliverUserId() {
        return deliverUserId;
    }

    public void setDeliverUserId(Long deliverUserId) {
        this.deliverUserId = deliverUserId;
    }

    public Long getReceiveTime() {
        return receiveTime;
    }

    public void setReceiveTime(Long receiveTime) {
        this.receiveTime = receiveTime;
    }

    public Long getReceiveUserId() {
        return receiveUserId;
    }

    public void setReceiveUserId(Long receiveUserId) {
        this.receiveUserId = receiveUserId;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public InOutTypeEnum getDeliveryType() {
        return deliveryType;
    }

    public void setDeliveryType(InOutTypeEnum deliveryType) {
        this.deliveryType = deliveryType;
    }

    public Boolean getEffect() {
        return effect;
    }

    public void setEffect(Boolean effect) {
        this.effect = effect;
    }
}
