package cn.iocoder.yudao.module.system.dal.dataobject.customersettlement;

import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
import cn.iocoder.yudao.module.system.controller.admin.customersettlement.vo.PaymentItem;
import cn.iocoder.yudao.module.system.controller.admin.worklog.vo.upload.UploadUserFile;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.*;

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

/**
 * 客户结算信息 DO
 *
 * @author 陈宾顺
 */
@TableName(value = "system_customer_settlement", autoResultMap = true)
@KeySequence("system_customer_settlement_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CustomerSettlementDO extends BaseDO {

    /**
     * 主键ID
     */
    @TableId
    private Long id;
    /**
     * 客户id
     */
    private Long customerId;

    /**
     * 结算月份
     */
    private String settlementMonth;

    /**
     * 收款明细
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<PaymentItem> paymentItem;

    /**
     * 收款金额
     */
    private BigDecimal paymentAmount;

    /**
     * 备注
     */
    private String notes;

    /**
     * 结算状态 | 1已复核 2已确认
     */
    private Integer status;

    /**
     * 上传附件
     */
    @TableField(typeHandler = JacksonTypeHandler.class)
    private List<UploadUserFile> fileItems;
}