package com.izouma.nineth.domain;

import com.izouma.nineth.converter.CoordinateConverter;
import com.izouma.nineth.dto.CoordinateDTO;
import com.izouma.nineth.enums.MetaRegionEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@ApiModel("元宇宙空间信息")
public class MetaSpatialInfo extends BaseEntity {

    @ApiModelProperty("所属区域")
    @Enumerated(EnumType.STRING)
    private MetaRegionEnum region;

    @ApiModelProperty("目前状态：true在售/false未售")
    private boolean sale;

    @ApiModelProperty("所属用户id")
    private Long userId;

    @ApiModelProperty("空间大小")
    private int size;

    @ApiModelProperty("区域内坐标")
    @Convert(converter = CoordinateConverter.class)
    private CoordinateDTO coordinate;

    @ApiModelProperty("藏品id")
    private Long assetId;

    @ApiModelProperty("hash值")
    private String hcTxHash;

}
