package com.czg.order.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 挂账账单付款记录
 *
 * @author Tankaikai tankaikai@aliyun.com
 * @since 1.0 2025-03-04
 */
@Data
@Table("tb_credit_payment_record")
public class CreditPaymentRecord implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @Id(keyType = KeyType.Auto)
    private Long id;
    /**
     * 订单id
     */
    private Long orderId;
    /**
     * 挂账人编码
     */
    private String creditBuyerId;
    /**
     * 还款金额
     */
    private BigDecimal repaymentAmount;
    /**
     * 支付方式
     */
    private String paymentMethod;
    /**
     * 备注
     */
    private String remark;
    /**
     * 还款时间
     */
    private LocalDateTime paymentTime;
    /**
     * 操作时间
     */
    @Column(onInsertValue = "now()")
    private LocalDateTime createTime;
}