package com.izouma.nineth.domain;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.izouma.nineth.domain.BaseEntity;
import com.izouma.nineth.enums.rewardpoints.PointActivityAwardType;
import io.swagger.annotations.ApiModel;
import lombok.*;

import javax.persistence.*;

@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Table(name = "point_activity_award", indexes = {
        @Index(columnList = "id"),
        @Index(columnList = "activityId"),
})
@ApiModel("积分兑换奖品")
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class PointActivityAward extends BaseEntity{
    /**
     * 奖品活动ID
     */
    private Long activityId;
    /**
     * 奖品名称
     */
    private String name;
    /**
     * 奖品图片
     */
    @Column(columnDefinition = "TEXT")
    private String pic;
    /**
     * 奖品类型
     */
    @Enumerated(EnumType.STRING)
    private PointActivityAwardType type;
    /**
     * 奖品库存
     */
    private Integer stock;
    /**
     * 活动发放数量
     */
    private Integer num;
    /**
     * 稀有
     */
    private boolean rare;
    /**
     * 获得奖品为数字藏品时有效,为获得的藏品Id
     */
    private Long awardCollectionId;
    /**
     * 奖品排序
     */
    private int orderNum;
}
