package com.izouma.nineth.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.izouma.nineth.annotations.Searchable;
import com.izouma.nineth.converter.LongArrayConverter;
import com.izouma.nineth.domain.UserWareHouse;
import com.izouma.nineth.enums.ItemType;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.springframework.beans.BeanUtils;

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

@ApiModel("物品信息")
@Data
public class UserWareHouseExcelDTO {

    public UserWareHouseExcelDTO(UserWareHouse userWareHouse){
        BeanUtils.copyProperties(userWareHouse, this);
    }

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

    @ExcelProperty("电话号码")
    private String phone;

    @ExcelProperty("凭证类型")
    private Integer itemId;

    @ExcelProperty("凭证说明")
    private ItemType itemName;

    @ExcelProperty("优先时间（h）")
    private int advancePurchaseTime;

    @ExcelProperty("优先次数")
    private int advancePurchaseCount;

    @ExcelProperty("是否有效")
    private boolean disabled;

    @ExcelProperty("说明")
    private String text;

    @ExcelProperty("活动名字")
    private String name;


    @ExcelProperty("资产ID")
    @Searchable
    private Long assetId;

    @ExcelProperty("生效藏品")
    private List<Long> targetCollectionIdList;

    @ExcelProperty("优先购配置ID")
    private Long activityPriorityDocumentId;

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

    @ExcelProperty("过期时间")
    private LocalDateTime overdueTime;

    /**
     * 白名单ID
     */
    @ExcelProperty("白名单配置ID")
    private Long whitelistConfigId;

}
