package com.storlead.sales.pojo.dto.customer;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.storlead.framework.annotate.Dict;
import com.storlead.sales.pojo.dto.sku.QuotationAddDTO;
import com.storlead.sales.pojo.entity.task.TaskEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "OrderFormAddDTO", description = "订单添加DTO")
public class OrderFormAddDTO {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "订单表主键")
    private Long id;

    @ApiModelProperty(value = "订单标题")
    private String title;

    @ApiModelProperty(value = "关联客户id")
    private Long customerId;

    @ApiModelProperty(value = "关联商机id")
    private Long businessId;

    @ApiModelProperty(value = "关联报价id")
    private Long quotationId;

    @ApiModelProperty(value = "订单总金额")
    private BigDecimal orderAmount;

    @ApiModelProperty(value = "订单总金额")
    private BigDecimal totalOrderAmt;

    @ApiModelProperty(value = "汇率")
    private BigDecimal rate;

    @ApiModelProperty(value = "关联币种id")
    private Long currencyId;

    @ApiModelProperty(value = "订单类型value（对应字典订单类型value）")
    @Dict(dictCode = "order_type")
    private String orderTypeDictValue;

    @ApiModelProperty(value = "签单日期")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JSONField(format ="yyyy-MM-dd")
    private Date signingDate;

    @ApiModelProperty(value = "预计生成日期")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JSONField(format ="yyyy-MM-dd")
    private Date expectedProductionDate;

    @ApiModelProperty(value = "预计发货日期")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @JSONField(format ="yyyy-MM-dd")
    private Date expectedDeliveryDate;

    @ApiModelProperty(value = "客户签约人")
    private String customerSignatory;

    @ApiModelProperty(value = "我方签约人")
    private String ourSignatory;

    @ApiModelProperty(value = "备注信息")
    private String remark;

//    @ApiModelProperty(value = "提醒用户id，逗号隔开")
    private String remindUserIds;

    @ApiModelProperty(value = "归属人员")
    private Long ownerBy;

    @ApiModelProperty(value = "协作人员id,逗号分割")
    private String collaborator;

    @ApiModelProperty(value = "协作人员idList")
    private List<Long> collaboratorList;

    @ApiModelProperty(value = "附件idList")
    private List<Long> resourceIdList;

    @ApiModelProperty(value = "关联任务")
    private TaskEntity task;

    @ApiModelProperty(value = "添加/编辑报价详情")
    private QuotationAddDTO quotationAddDTO;
}
