package com.izouma.wenlvju.domain;

import com.izouma.wenlvju.enums.AnnouncementType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.Where;

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


@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Builder
@Where(clause = "del = 0")
public class Announcement extends BaseEntity {
    private String title;

    @Enumerated(EnumType.STRING)
    private AnnouncementType type;

    @Column(columnDefinition = "TEXT")
    private String content;
}
