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

import cn.iocoder.yudao.framework.common.pojo.UploadUserFile;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

@Schema(description = "管理后台 - 开票申请创建 Request VO")
@Data
@EqualsAndHashCode()
@ToString(callSuper = true)
public class BpmOAInvoiceCreateReqVO {

    @Schema(description = "计划开票日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "计划开票日期不能为空")
    private LocalDate invoiceDate;

    @Schema(description = "关联合同业务编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "合同编号不能为空")
    private Long contractId;

    @Schema(description = "关联合同流程实例编号", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private String contractInstanceId;

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

    @Schema(description = "开票主体", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "开票主体不能为空")
    private String invoiceBody;

    @Schema(description = "发票抬头", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "发票抬头不能为空")
    private String invoiceName;

    @Schema(description = "抬头类型 | 1企业2个人3事业单位", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "抬头类型不能为空")
    private Integer invoiceIssue;

    @Schema(description = "发票类型 | 1普票 2专票", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "发票类型不能为空")
    private Integer invoiceType;

    @Schema(description = "统一社会信用代码", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "统一社会信用代码不能为空")
    private String registerNo;

    @Schema(description = "开票金额", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "开票金额不能为空")
    private BigDecimal amount;

    @Schema(description = "开票内容", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "开票内容不能为空")
    private String content;

    @Schema(description = "开票单位地址")
    private String unitAddress;

    @Schema(description = "开票单位电话")
    private String unitPhone;

    @Schema(description = "开票单位开户银行")
    private String unitBankName;

    @Schema(description = "开票单位银行账号")
    private String unitBankNo;

    @Schema(description = "开票单位邮箱")
    private String email;

    @Schema(description = "开票状态", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private Integer status;

    @Schema(description = "流程实例编号")
    private String processInstanceId;

    @Schema(description = "状态-参见 bpm_process_instance_result 枚举", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Integer result;

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