package com.ruoyi.bst.creditUser.domain;

import java.math.BigDecimal;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

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

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 挂账用户对象 bst_credit_user
 *
 * @author ruoyi
 * @date 2025-05-28
 */
@Data
public class CreditUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private Long id;

    @Excel(name = "用户ID")
    @ApiModelProperty("用户ID")
    private Long userId;

    @Excel(name = "挂账方ID")
    @ApiModelProperty("挂账方ID")
    @NotNull(message = "挂账方ID不能为空", groups = {ValidGroup.Create.class})
    private Long creditId;

    @Excel(name = "每月限额")
    @ApiModelProperty("每月限额")
    @Min(value = 0, message = "每月限额不能小于0")
    private BigDecimal limitAmount;

    @Excel(name = "已用金额")
    @ApiModelProperty("已用金额")
    private BigDecimal usedAmount;

}
