package com.ruoyi.bst.credit.domain;

import java.math.BigDecimal;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
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
 *
 * @author ruoyi
 * @date 2025-05-27
 */
@Data
public class Credit extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private Long id;

    @Excel(name = "名称")
    @ApiModelProperty("名称")
    @NotBlank(message = "名称不能为空", groups = {ValidGroup.Create.class})
    private String name;

    @Excel(name = "状态", readConverterExp = "1=正常,2=停用")
    @ApiModelProperty("状态")
    @NotBlank(message = "状态不能为空", groups = {ValidGroup.Create.class})
    private String status;

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

    @Excel(name = "管理员ID")
    @ApiModelProperty("管理员ID")
    private Long adminId;

    @Excel(name = "创建人ID")
    @ApiModelProperty("创建人ID")
    private Long createId;

    @Excel(name = "运营区ID")
    @ApiModelProperty("运营区ID")
    @NotNull(message = "运营区ID不能为空", groups = {ValidGroup.Create.class})
    private Long areaId;

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

    @ApiModelProperty("LOGO")
    private String logo;
}
