package com.hotwj.platform.pay.domain.bo;

import cn.idev.excel.annotation.ExcelProperty;
import com.hotwj.platform.pay.domain.PayWalletTransaction;
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;

/**
 * 会员钱包流水业务对象 pay_wallet_transaction
 *
 * @author shihongwei
 * @date 2026-05-08
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = PayWalletTransaction.class, reverseConvertGenerate = false)
public class PayWalletTransactionBo extends BaseEntity {

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

    /**
     * 钱包 id
     */
    @NotNull(message = "钱包 id不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long walletId;

    /**
     * 关联类型
     */
    @NotNull(message = "关联类型不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long bizType;

    /**
     * 关联业务编号
     */
    @NotBlank(message = "关联业务编号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String bizId;

    /**
     * 流水号
     */
    @NotBlank(message = "流水号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String no;

    /**
     * 流水标题
     */
    @NotBlank(message = "流水标题不能为空", groups = {AddGroup.class, EditGroup.class})
    private String title;

    /**
     * 交易金额
     */
    @NotNull(message = "交易金额不能为空", groups = {AddGroup.class, EditGroup.class})
    private BigDecimal price;

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

    /**
     * 0=正常, 1=已删除
     */
    private Long isDeleted;

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