package com.kxs.user.api.model;

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

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 用户账户表(KxsUserAmount)表实体类
 *
 * @author 系统
 * @since 2023-12-11 23:33:30
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class KxsUserAmount extends Model<KxsUserAmount> implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    
    /**
     * 主键ID
     */
    @Schema(description = "主键ID")
    @TableId(type = IdType.AUTO)
    private Integer id;


    /**
     * 新增时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "新增时间")
    private LocalDateTime createTime;


    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;


    /**
     * 删除标记，0未删除，1已删除
     */
    @Schema(description = "删除标记，0未删除，1已删除")
    private String delFlag;



    /**
     * 版本
     */
    @Schema(description = "版本")
    private Integer version;


    /**
     * 余额
     */
    @Schema(description = "余额")
    private BigDecimal amount;


    /**
     * 可使用余额
     */
    @Schema(description = "可使用余额")
    private BigDecimal useAmount;


    /**
     * 冻结金额
     */
    @Schema(description = "冻结金额")
    private BigDecimal frozenAmount;


    /**
     * 已提现金额
     */
    @Schema(description = "已提现金额")
    private BigDecimal cashWithdrawalAmount;


    /**
     * 累计总收益
     */
    @Schema(description = "累计总收益")
    private BigDecimal totalAmount;


    /**
     * 用户ID
     */
    @Schema(description = "用户ID")
    private Integer userId;

    /**
     * 账户状态 1正常 0锁定
     */
    private Integer status;

    /**
     * 备注
     */
    private String remark;

    /**
     * 预扣款
     */
    @Schema(description = "预扣款")
    private BigDecimal advanceAmount;

    /**
     * 盟主储备金
     */
    @Schema(description = "盟主储备金")
    private BigDecimal leaderReserve;

    /**
     * 盟主余额
     */
    @Schema(description = "盟主余额")
    private BigDecimal leaderBalanceAmount;

    /**
     * 盟主预扣款
     */
    @Schema(description = "盟主预扣款")
    private BigDecimal leaderAdvanceAmount;
    
    /**
     * 合伙人预扣款
     */
    @Schema(description = "合伙人预扣款")
    private BigDecimal partnerAdvanceAmount;


}

