package com.izouma.nineth.domain;

import com.alibaba.excel.annotation.ExcelProperty;
import com.izouma.nineth.annotations.Searchable;
import com.izouma.nineth.enums.FundChangeStatus;
import com.izouma.nineth.enums.FundChangeType;
import com.izouma.nineth.enums.IntegralChangeType;
import com.izouma.nineth.enums.IntegralFlag;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.math.BigDecimal;
import java.time.LocalDateTime;


@Data
@Entity
@Table(indexes = {
        @Index(columnList = "userId"),
})
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel("用户积分变动记录")
public class UserIntegralChangeLog extends BaseEntity {

    @ApiModelProperty("用户ID")
    @ExcelProperty("用户ID")
    private Long userId;

    @ApiModelProperty("变动类型")
    @ExcelProperty("变动类型")
    @Enumerated(EnumType.STRING)
    private IntegralChangeType changeType;

    @ApiModelProperty("出入帐标识")
    @ExcelProperty("出入帐标识")
    @Enumerated(EnumType.STRING)
    private IntegralFlag flag;

    @ApiModelProperty("描述")
    @ExcelProperty("描述")
    private String description;

    @ApiModelProperty("变动积分")
    @ExcelProperty("变动积分")
    private Long integral;

    @ApiModelProperty("剩余积分")
    @ExcelProperty("剩余积分")
    private Long restIntegral;

    @ApiModelProperty("变动来源ID")
    @ExcelProperty("变动来源ID")
    private Long sourceId;



}
