package com.izouma.nineth.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.izouma.nineth.converter.FileObjectListConverter;
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.util.List;

@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Builder
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = {"hibernateLazyInitializer"}, ignoreUnknown = true)
public class ActivityMaterial extends BaseEntity {
    private Long orderId;

    private Long assetId;

    private Long collectionId;

    private String name;

    @ApiModelProperty("图片")
    @Convert(converter = FileObjectListConverter.class)
    @Column(columnDefinition = "TEXT")
    private List<FileObject> pic;

    @ApiModelProperty("编号")
    private Integer number;

    @ApiModelProperty("分类")
    private String category;

}
