| | |
| | | package com.taoke.autopay.entity.credit; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.data.annotation.Id; |
| | | import lombok.experimental.Tolerate; |
| | | import org.yeshi.utils.generater.mybatis.Column; |
| | | import org.yeshi.utils.generater.mybatis.Table; |
| | | |
| | | import org.springframework.data.annotation.Id; |
| | | import java.math.BigDecimal; |
| | | import org.yeshi.utils.generater.mybatis.Table; |
| | | import java.util.Date; |
| | | import lombok.Data; |
| | | import lombok.Builder; |
| | | |
| | | @Data |
| | | @Builder |
| | | @Table(value = "table_user_credit_record") |
| | | public class UserCreditRecord { |
| | | |
| | |
| | | public static final int DIRECTION_GAIN = 1; // 方向获得 |
| | | |
| | | // 添加常量:方向消耗 |
| | | public static final int DIRECTION_CONSUME = 0; // 方向消耗 |
| | | public static final int DIRECTION_CONSUME = 0; // 方向消耗 |
| | | |
| | | @Id |
| | | @Column(name = "id") |
| | |
| | | private Integer direction; // 方向(获得/消耗) |
| | | |
| | | @Column(name = "identifier_id") |
| | | private Long identifierId; // 标识ID |
| | | private String identifierId; // 标识ID |
| | | |
| | | @Column(name = "credit_amount") |
| | | private Integer creditAmount; // 积分数量 |
| | | |
| | | @Column(name = "acquisition_method") |
| | | private AcquisitionMethod acquisitionMethod; // 获取方式 |
| | | |
| | | @Column(name = "consumption_method") |
| | | private ConsumptionMethod consumptionMethod; // 消耗方式 |
| | | |
| | | // 新增:说明字段 |
| | | @Column(name = "description") |
| | | private String description; // 说明 |
| | | |
| | | @Column(name = "create_time") |
| | | private Date createTime; // 创建时间 |
| | |
| | | @Column(name = "update_time") |
| | | private Date updateTime; // 更新时间 |
| | | |
| | | @Tolerate |
| | | // 新增默认构造函数 |
| | | public UserCreditRecord() { |
| | | } |
| | | |
| | | // 新增:获取方式枚举 |
| | | public enum AcquisitionMethod { |
| | | COMMAND_PAYMENT("口令代付"), |
| | | EXCHANGE_RETURN("兑换退回") |
| | | ; |
| | | |
| | | private final String description; |
| | | |
| | | AcquisitionMethod(String description) { |
| | | this.description = description; |
| | | } |
| | | |
| | | public String getDescription() { |
| | | return description; |
| | | } |
| | | } |
| | | |
| | | // 消耗方式枚举 |
| | | public enum ConsumptionMethod { |
| | | EXCHANGE_RED_PACKET("兑换红包"); |
| | | private final String description; |
| | | ConsumptionMethod(String description) { |
| | | this.description = description; |
| | | } |
| | | |
| | | public String getDescription() { |
| | | return description; |
| | | } |
| | | } |
| | | } |