package org.dromara.payment.invoice.domain.bo;

import org.dromara.payment.invoice.domain.MerInvoice;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 商户发票记录业务对象 mer_invoice
 *
 * @author LionLi
 * @date 2024-05-06
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = MerInvoice.class, reverseConvertGenerate = false)
public class MerInvoiceBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 申请开票流水号
     */
    private String no;

    /**
     * 发票抬头
     */
    @NotBlank(message = "发票抬头不能为空", groups = { AddGroup.class, EditGroup.class })
    private String header;

    /**
     * 发票类型（1：增值税专用发票 2：增值税普通发票 3：差额票）
     */
    @NotNull(message = "发票类型（1：增值税专用发票 2：增值税普通发票 3：差额票）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long type;

    /**
     * 纳税人识别号
     */
    @NotBlank(message = "纳税人识别号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String creditCode;

    /**
     * 开户银行地址
     */
    @NotBlank(message = "开户银行地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String bankAddress;

    /**
     * 开户银行账号
     */
    @NotBlank(message = "开户银行账号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String bankCard;

    /**
     * 开票类目
     */
    @NotBlank(message = "开票类目不能为空", groups = { AddGroup.class, EditGroup.class })
    private String category;

    /**
     * 发票数量（张）
     */
    private Long invNum;

    /**
     * 开票总金额
     */
    private Long invAmount;

    /**
     * 收件地址id
     */
    @NotNull(message = "收件地址id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long addId;

    /**
     * 收件人姓名
     */
    @NotBlank(message = "收件人姓名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String addName;

    /**
     * 收件人手机号
     */
    @NotBlank(message = "收件人手机号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String addPhone;

    /**
     * 收件地址
     */
    @NotBlank(message = "收件地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String addAddress;

    /**
     * 邮箱地址
     */
    private String addEmail;

    /**
     * 快递状态（1：未寄出 2：未签收 3：已签收）
     */
    private Integer iogisticsStatus;

    /**
     * 快递时间
     */
    private Date iogisticsTime;

    /**
     * 快递发件人
     */
    private String iogisticsBy;

    /**
     * 快递公司（字典值）
     */
    private String iogisticsCompany;

    /**
     * 快递单号
     */
    private String iogisticsNo;

    /**
     * 开票状态（1:待开票、2:已开票、3:已取消  4:驳回 5：开票中）
     */
    private Integer status;

    /**
     * 添加时间
     */
    private Date addTime;

    /**
     * 添加人
     */
    private String addBy;

    /**
     * 取消时间
     */
    private Date cancelTime;

    /**
     * 取消或驳回人
     */
    private String cancelBy;

    /**
     * 取消或驳回原因
     */
    private String cancelReason;

    /**
     * 发票备注栏
     */
    private String invRemark;

    /**
     * 备注
     */
    private String remark;

    /**
     * 单位注册地址
     */
    @NotBlank(message = "单位注册地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String dwzcdz;

    /**
     * 单位电话
     */
    @NotBlank(message = "单位电话不能为空", groups = { AddGroup.class, EditGroup.class })
    private String dwdh;

    /**
     * 结算中心id
     */
    @NotNull(message = "结算中心id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long sydId;

    /**
     * 结算中心编号
     */
    @NotBlank(message = "结算中心编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String sydNo;

    /**
     * 运营商编号
     */
    @NotBlank(message = "运营商编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String opNo;

    /**
     * 运营商id
     */
    @NotNull(message = "运营商id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long opId;

    /**
     * 代理商id
     */
    @NotNull(message = "代理商id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long channelId;

    /**
     * 代理商编号
     */
    @NotBlank(message = "代理商编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String channelNo;

    /**
     * 代理商上下级关系编码
     */
    private String channelCode;

    /**
     * 商户id
     */
    @NotNull(message = "商户id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long merId;

    /**
     * 商户编号
     */
    @NotBlank(message = "商户编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String merNo;

    /**
     * 业务类型(1:委托代征，2:自然人代开，3:个体户注册 4:临时税务登记 5：资金代发 6：派遣&外包
     */
    @NotNull(message = "业务类型(1:委托代征，2:自然人代开，3:个体户注册 4:临时税务登记 5：资金代发 6：派遣&外包不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer busType;

    /**
     * 快递签收时间
     */
    private Date iogisticsReceivingTime;

    /**
     * 快递签收人
     */
    private String iogisticsReceivingBy;

    /**
     * 发票相关的代发批次列表
     */
    private List<MerInvoiceBillBo> bills;


    private String categoryOne;

    private String categoryTwo;
}
