package com.izouma.nineth.dto.openapi;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.izouma.nineth.converter.FileObjectListConverter;
import com.izouma.nineth.domain.FileObject;
import lombok.Data;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author ZouYuHong
 */
@Data
@Entity
@Table(name = "collection_info")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class TransferCollectionDTO {
    /**
     * 价格
     */
    @Column(precision = 10, scale = 2)
    private BigDecimal price;
    /**
     * 图片
     */
    @Column(columnDefinition = "TEXT")
    @Convert(converter = FileObjectListConverter.class)
    private List<FileObject> pic;
    /**
     * 图片地址
     */
    @Transient
    private String img;
    /**
     * 藏品名称
     */
    private String name;
    /**
     * 藏品ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
}
