package org.cs.mgr.sys.model;

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

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

@Entity
@DynamicInsert
@DynamicUpdate
@Table( name = "mgm_sys_area")
public class Area{

	private int id;
	private int pid;
	private String name;
	private String code;
	
	@Id
	@SequenceGenerator(name="TB_MGM_AREA",sequenceName="SYS_AREA_SEQ")
	@GeneratedValue(generator="TB_MGM_AREA",strategy=GenerationType.SEQUENCE)
	@Column(name = "id", unique = true, nullable = false, precision = 11, scale = 0)
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getPid() {
		return pid;
	}
	public void setPid(int pid) {
		this.pid = pid;
	}
	
	@Column(columnDefinition="varchar(48)")
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	@Column(columnDefinition="varchar2(18)")
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	
	
	
}
