package com.ssj.bean.weixin.problem.domain;

import com.ssj.bean.common.framework.core.domain.BaseEntity;

import javax.persistence.*;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Entity
@Table(name = "ydz_artice")
public class Artice extends BaseEntity{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String headline;//标题
	private String content;//内容
	private String grade;//年级
	private Integer version;//版本
	private Integer number;//排序
	private Date createTime;//创建时间
	
	private List<ArticeMatter> matterList = new ArrayList<ArticeMatter>();
	
	public String getHeadline() {
		return headline;
	}
	public void setHeadline(String headline) {
		this.headline = headline;
	}
	
	public String getContent() {
		return content;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public String getGrade() {
		return grade;
	}
	public void setGrade(String grade) {
		this.grade = grade;
	}
	
	public Integer getVersion() {
		return version;
	}
	public void setVersion(Integer version) {
		this.version = version;
	}
	public Integer getNumber() {
		return number;
	}
	public void setNumber(Integer number) {
		this.number = number;
	}
	@Column(updatable =false)
	public Date getCreateTime() {
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	@OneToMany(cascade = { CascadeType.REFRESH}, fetch=FetchType.EAGER)
	@JoinColumn(name="articeId",updatable =false,insertable =false)
	@OrderBy(" count asc")
	public List<ArticeMatter> getMatterList() {
		return matterList;
	}
	public void setMatterList(List<ArticeMatter> matterList) {
		this.matterList = matterList;
	}
	
	
	
	

}
