package com.loan.system.domain.entity;

import lombok.*;

import javax.persistence.*;
import java.math.BigDecimal;
import java.time.Instant;

@Entity
@Table(name = "repayment")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Repayment extends BaseEntity{
    private static final long serialVersionUID = 18L;

    @Column(name = "case_id")
    private Long caseId;

    @Column(name = "contract_id")
    private Long contractId;

    @Column(name = "customer_id")
    private Long customerId;

    @Column(name = "start_user_id")
    private Long startUserId;

    @Column(name = "approval_user_id")
    private Long approvalUserId;

    @Column(name = "repayment_type", length = 10)
    private String repaymentType;

    @Column(name = "total_amount", precision = 18, scale = 2)
    private Double totalAmount;

    @Column(name = "confirmed_id")
    private Long confirmedId;

    @Column(name = "confirmed_at")
    private String confirmedAt;

    @Column(name = "interest", precision = 18, scale = 2)
    private Double interest;

    @Column(name = "is_cleared")
    private Boolean isCleared;

    @Column(name = "repay_way",length = 10)
    private String repayWay;

    @Column(name = "create_time")
    private String createTime;

    @Column(name = "update_time")
    private String updateTime;

    @Column(name = "is_delete")
    private Boolean isDelete;

}