package com.izouma.nineth.domain;


import com.izouma.nineth.converter.LongArrayConverter;
import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import java.time.LocalDateTime;
import java.util.List;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@ApiModel("白名单配置信息")
public class WhiteListConfigInfo extends BaseEntity {
    /**
     *添加白名单的手机号
     */
    @Column(columnDefinition = "TEXT")
    private String phones;
    /**
     * 添加的白名单类型
     * 0为指定铸造者,1全局,2指定藏品
     */
    private Integer itemId;
    /**
     * 说明
     */
    private String text;
    /**
     *项目ID
     */
    private Integer projectId;
    /**
     * 可提前购买的藏品ID
     */
    private Long targetCollectionId;
    /**
     * 可提前购买的藏品ID
     */
    @Column(columnDefinition = "TEXT")
    @Convert(converter = LongArrayConverter.class)
    private List<Long> targetCollectionIdList;
    /**
     *可体检购买的时间
     */
    private Integer advancePurchaseTime;
    /**
     * 可优先购次数
     */
    private Integer advancePurchaseCount;
    /**
     *铸造者ID
     */
    private Long minterId;
    /**
     * 过期时间
     */
    private LocalDateTime overdueTime;
}
