package com.izouma.nineth.domain;

import com.izouma.nineth.annotations.Searchable;
import com.izouma.nineth.converter.StringArrayConverter;
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.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import java.math.BigDecimal;
import java.util.List;

@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel("铸造活动")
public class MintActivity extends BaseEntity{

    @Searchable
    private String name;

    @ApiModelProperty("铸造者ID")
    private Long minterId;

    @ApiModelProperty("铸造者头像")
    private String minterAvatar;

    @ApiModelProperty("铸造者")
    @Searchable
    private String minter;

    @ApiModelProperty("封面")
    private String cover;

    @ApiModelProperty("活动详情")
    @Column(columnDefinition = "TEXT")
    private String detail;

    @ApiModelProperty("藏品名称")
    private String collectionName;

    @ApiModelProperty("藏品数量")
    private int num;

    @ApiModelProperty("是否消耗藏品")
    private boolean consume;

    @ApiModelProperty("剩余数量")
    private int stock;

    @ApiModelProperty("发行数量")
    private int total;

    @ApiModelProperty("gas费")
    @Column(precision = 10, scale = 2)
    private BigDecimal gasPrice;
}
