package com.izouma.nineth.domain;

import com.izouma.nineth.annotations.Searchable;
import com.izouma.nineth.enums.BannerType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

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

@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel("Banner")
public class Banner extends BaseEntity {

    @ApiModelProperty("名称")
    @Searchable
    private String name;

    @ApiModelProperty("图片")
    private String pic;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("排序")
    private int sort;

    @ApiModelProperty("展示位置")
    @Enumerated(EnumType.STRING)
    private BannerType type;

    @ApiModelProperty("跳转")
    private boolean link;

    @ApiModelProperty("跳转类型")
    private String linkType;

    @ApiModelProperty("跳转内容")
    private String linkContent;
}
