package com.izouma.nineth.domain;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Table(indexes = {@Index(columnList = "title")})
@Entity
public class News extends BaseEntity {
    private String title;

    private String subtitle;

    private String pic;

    @Column(columnDefinition = "TEXT")
    private String detail;

    private int sort;

    private boolean display;

    @ApiModelProperty("点赞")
    private int likes;

    @Transient
    private boolean liked;

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

    @ApiModelProperty("按钮名称")
    private String buttonName;

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

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