98 lines
1.8 KiB
Java
98 lines
1.8 KiB
Java
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 +
|
||
'}';
|
||
}
|
||
}
|