package org.dromara.work.domain.bo;

import org.dromara.work.domain.TpUserRecord;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;

/**
 * 用户自己记录业务对象 tp_user_record
 *
 * @author Maosw
 * @date 2025-04-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = TpUserRecord.class, reverseConvertGenerate = false)
public class TpUserRecordBo extends BaseEntity {

    /**
     * 记录ID
     */
    @NotNull(message = "记录ID不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 用户姓名
     */
    private String userName;

    /**
     * 用户手机号码
     */
    private String userPhone;

    /**
     * 变动金额（正数增加，负数减少）
     */
    @NotNull(message = "变动金额（正数增加，负数减少）不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal amount;

    /**
     * 变动后余额
     */
    @NotNull(message = "变动后余额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal balance;

    /**
     * 变动类型: 1-增加, 2-扣除, 3-提现, 4-其他
     */
    @NotNull(message = "变动类型: 1-增加, 2-扣除, 3-提现, 4-其他不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer type;

    /**
     * 订单ID
     */
    private Long orderId;

    /**
     * 订单编号
     */
    private String orderNum;

    /**
     * 删除标志: 1-存在, 2-删除
     */
    private Integer delFlag;

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


}
