package com.uas.platform.b2b.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * 系统公告（正文）
 * 
 * @author yingp
 *
 */
@Entity
@Table(name = "info$noticesbody")
public class NoticeBody {

	@Id
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "info$noticesbody_gen")
	@SequenceGenerator(name = "info$noticesbody_gen", sequenceName = "info$noticesbody_seq", allocationSize = 1)
	@Column(name = "nb_id")
	private Long id;

	/**
	 * 正文
	 */
	@Column(name = "nb_text")
	private String text;

	@OneToOne(cascade = { CascadeType.ALL })
	@JoinColumn(name = "nb_noid")
	private Notice notice;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public Notice getNotice() {
		return notice;
	}

	public void setNotice(Notice notice) {
		this.notice = notice;
	}
}
