package com.izouma.nineth.dto.oasis;

import com.izouma.nineth.converter.FileObjectConverter;
import com.izouma.nineth.converter.FileObjectListConverter;
import com.izouma.nineth.converter.PrivilegeListConverter;
import com.izouma.nineth.converter.PropertyListConverter;
import com.izouma.nineth.domain.CollectionProperty;
import com.izouma.nineth.domain.FileObject;
import com.izouma.nineth.domain.Privilege;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

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

@Data
@AllArgsConstructor
@NoArgsConstructor
public class OasisDistrictDTO {
    private Long                     id;
    private Long                     oasisId;
    private String                   name;
    @Convert(converter = FileObjectListConverter.class)
    private List<FileObject>         pic;
    @Convert(converter = FileObjectConverter.class)
    private FileObject               model3d;
    private String                   detail;
    private String                   category;
    private int                      total;
    private BigDecimal               price;
    private BigDecimal               originalPrice;

    private int                      maxCount;
    @Convert(converter = PropertyListConverter.class)
    @ApiModelProperty("特性")
    private List<CollectionProperty> properties;
    @Convert(converter = PrivilegeListConverter.class)
    @ApiModelProperty("特权")
    private List<Privilege>          privileges;
    @ApiModelProperty("是否可转售")
    private boolean                  canResale;
}
