package com.ruoyi.payment.domain;

import java.math.BigDecimal;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 资金监管账户对象 dc_escrow_account
 * 
 * @author ruoyi
 * @date 2025-01-20
 */
public class EscrowAccount extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 账户ID */
    private Long accountId;

    /** 账户号码 */
    @Excel(name = "账户号码")
    @NotBlank(message = "账户号码不能为空")
    @Size(max = 100, message = "账户号码长度不能超过100个字符")
    private String accountNumber;

    /** 关联融资申请ID */
    @Excel(name = "关联融资申请ID")
    @NotNull(message = "关联融资申请ID不能为空")
    private Long applicationId;

    /** 总金额 */
    @Excel(name = "总金额")
    @NotNull(message = "总金额不能为空")
    @DecimalMin(value = "0.00", message = "总金额不能小于0")
    private BigDecimal totalAmount;

    /** 可用金额 */
    @Excel(name = "可用金额")
    @NotNull(message = "可用金额不能为空")
    @DecimalMin(value = "0.00", message = "可用金额不能小于0")
    private BigDecimal availableAmount;

    /** 冻结金额 */
    @Excel(name = "冻结金额")
    @NotNull(message = "冻结金额不能为空")
    @DecimalMin(value = "0.00", message = "冻结金额不能小于0")
    private BigDecimal frozenAmount;

    /** 账户状态 */
    @Excel(name = "账户状态")
    @NotBlank(message = "账户状态不能为空")
    @Pattern(regexp = "^(ACTIVE|FROZEN|CLOSED|SUSPENDED)$", message = "账户状态只能是ACTIVE、FROZEN、CLOSED或SUSPENDED")
    private String accountStatus;

    public void setAccountId(Long accountId) 
    {
        this.accountId = accountId;
    }

    public Long getAccountId() 
    {
        return accountId;
    }
    public void setAccountNumber(String accountNumber) 
    {
        this.accountNumber = accountNumber;
    }

    public String getAccountNumber() 
    {
        return accountNumber;
    }
    public void setApplicationId(Long applicationId) 
    {
        this.applicationId = applicationId;
    }

    public Long getApplicationId() 
    {
        return applicationId;
    }
    public void setTotalAmount(BigDecimal totalAmount) 
    {
        this.totalAmount = totalAmount;
    }

    public BigDecimal getTotalAmount() 
    {
        return totalAmount;
    }
    public void setAvailableAmount(BigDecimal availableAmount) 
    {
        this.availableAmount = availableAmount;
    }

    public BigDecimal getAvailableAmount() 
    {
        return availableAmount;
    }
    public void setFrozenAmount(BigDecimal frozenAmount) 
    {
        this.frozenAmount = frozenAmount;
    }

    public BigDecimal getFrozenAmount() 
    {
        return frozenAmount;
    }
    public void setAccountStatus(String accountStatus) 
    {
        this.accountStatus = accountStatus;
    }

    public String getAccountStatus() 
    {
        return accountStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("accountId", getAccountId())
            .append("accountNumber", getAccountNumber())
            .append("applicationId", getApplicationId())
            .append("totalAmount", getTotalAmount())
            .append("availableAmount", getAvailableAmount())
            .append("frozenAmount", getFrozenAmount())
            .append("accountStatus", getAccountStatus())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}