package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.contract;

import cn.iocoder.yudao.framework.common.pojo.UploadUserFile;
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOABaseRespVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.List;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;

/**
 * @author 符溶馨
 */
@Schema(description = "管理后台 - 合同审批 请求Request VO")
@Data
public class BpmOAContractRespVO extends BpmOABaseRespVO {

    @Schema(description = "发起人用户编号", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long userId;

    @Schema(description = "合同类型 | 字典值 bpm_oa_contract_type", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer contractType;

    @Schema(description = "合同名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String contractName;

    @Schema(description = "合同编号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String contractNo;

    @Schema(description = "签约日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private String signingDate;

    @Schema(description = "客户编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private Long customerId;

    @Schema(description = "客户名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String customerName;

    @Schema(description = "客户签约人（联系人ID）", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private Long contactsId;

    @Schema(description = "客户签约人(联系人)名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String contactsName;

    @Schema(description = "签约公司编号", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long companyId;

    @Schema(description = "签约公司名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String companyName;

    @Schema(description = "签约人编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private Long signatoryId;

    @Schema(description = "签约人名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String signatoryName;

    @Schema(description = "合同金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private BigDecimal contractMoney;

    @Schema(description = "已收/已付金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private BigDecimal returnMoney;

    @Schema(description = "已开票金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private BigDecimal invoiceMoney;

    @Schema(description = "产品总金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private BigDecimal totalPrice;

    @Schema(description = "整单优惠金额", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private BigDecimal discountRate;

    @Schema(description = "商机ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private Long businessId;

    @Schema(description = "商机名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String businessName;

    @Schema(description = "合同开始时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private String startDate;

    @Schema(description = "合同结束时间", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private String endDate;

    @Schema(description = "合同状态 | 1已签约 2过期", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private Integer status;

    @Schema(description = "上传文件", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<UploadUserFile> fileItems;

    @Schema(description = "创建人名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String createName;
}
