fire_point/src/main/java/com/xkrs/model/entity/NoticeEntity.java

98 lines
1.8 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.xkrs.model.entity;
import javax.persistence.*;
import java.io.Serializable;
/**
* 公告栏通知
*/
@Entity
@Table(name = "notice")
public class NoticeEntity implements Serializable {
/**
* 指定主键,建立自增序列,主键值取自序列
*/
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "notice_seq_gen")
@SequenceGenerator(name = "notice_seq_gen", sequenceName = "notice_id_seq", allocationSize = 1)
private Long id;
/**
* 标题
*/
private String title;
/**
* 内容
*/
@Column(length = 40960, columnDefinition = "varchar(40960)")
private String content;
/**
* 作者
*/
private String author;
/**
* 公告栏通知的状态
* 0正常
* 1禁用
*/
private Integer state;
public NoticeEntity() {
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public Integer getState() {
return state;
}
public void setState(Integer state) {
this.state = state;
}
@Override
public String toString() {
return "NoticeEntity{" +
"id=" + id +
", title='" + title + '\'' +
", content='" + content + '\'' +
", author='" + author + '\'' +
", state=" + state +
'}';
}
}