package com.maintain.business.domain.bo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.maintain.common.core.validate.AddGroup;
import com.maintain.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

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

import com.fasterxml.jackson.annotation.JsonFormat;
import com.maintain.common.core.domain.BaseEntity;
import net.bytebuddy.implementation.bind.annotation.Empty;

/**
 * 结算维修单业务对象 erp_settlement_maintain
 *
 * @author liushuai
 * @date 2025-04-03
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class ErpSettlementMaintainBo extends BaseEntity {

    /**
     * 主键
     */
    private Long id;

    /**
     * 结算单号
     */
    private String settlementNumber;

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

    /**
     * 客户名称
     */
    private String clientName;

    /**
     * 客户手机号
     */
    private String clientPhone;

    /**
     * 客户类型（1个人 2企业）
     */
    private Integer clientType;

    /**
     * 证件类型（1居民身份证 2纳税识别号）
     */
    private Integer clientCertificateType;

    /**
     * 证件号
     */
    private String clientCertificateNumber;

    /**
     * 工时费优惠
     */
    @NotNull(message = "工时费优惠不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal manHourDiscountMoney;

    /**
     * 原料费优惠
     */
    @NotNull(message = "原料费优惠不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal materialDiscountMoney;

    /**
     * 结算时间
     */
    @NotNull(message = "结算时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date settlementTime;

    /**
     * 支付方式（1支付宝 2微信）
     */
    @NotNull(message = "支付方式（1支付宝 2微信）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer paymentMethod;

    /**
     * 付款账号
     */
    private String paymentAccount;

    /**
     * 付款账号名称
     */
    private String paymentAccountName;

    /**
     * 付款凭证
     */
    @NotBlank(message = "付款凭证不能为空", groups = { AddGroup.class, EditGroup.class })
    private String paymentVoucher;

    /**
     * 结算单备注
     */
    private String settlementRemark;

    /**
     * 应收金额
     */
    private BigDecimal receivableMoney;

    /**
     * 实际金额
     */
    private BigDecimal practicalMoney;

    /**
     * 收款时间
     */
    private Date collectionTime;

    /**
     * 收款回执
     */
    private String collectionVoucher;

    /**
     * 收款账号
     */
    private String collectionAccount;

    /**
     * 收款流水号
     */
    private String collectionSerialNumber;

    /**
     * 收款备注
     */
    private String collectionRemark;

    /**
     * 结算状态（1未确认 2已确认）
     */
    private Integer state;

    /**
     * 创建部门（数据权限）
     */
    private Long createDeptId;

    @NotEmpty(message = "关联报修单不能为空", groups = { AddGroup.class, EditGroup.class })
    private List<Long> repairFormIds;
}
