

create class if not exists univ_demo : / ( )
with autosearch=true , version=false , key=manu, alias='univ_demo' , namespace='univ_demo'
;


create class if not exists /univ_demo/org ( 
		code				varchar	"单位代码",
		dept_sort		varchar	"单位类别代码",
		dept_sort_name		varchar	"单位类别名",
		dwjb				varchar	"单位级别代码",
		dwjb_name		varchar	"单位级别名",
		name				varchar	"单位全称",
		up					varchar	"上级单位",
		
		index( code,dept_sort,dept_sort_name,dwjb,dwjb_name,name,up) 

)with core=memory , autosearch=true , version=false , key=manu, alias='组织机构信息' , nickname='univ_demo_org'
;

create class if not exists /univ_demo/person ( 
		account			varchar	"工号",
		actual_quit_date		timestamp	"真实离校日期(离校日期/人员离退休日期/人员去世日期 三个字段中最小的时间)",
		age					varchar	"年龄",
		birthday		varchar,
		deceased_date		timestamp	"人员去世日期",
		degree_level		varchar	"学位层次",
		degree_level_code		varchar	"学位层次代码",
		is_last_degree		varchar	"是否最高学位",
		is_last_degree_code		varchar	"是否最高学位代码",
		join_u_date		timestamp	"报到入职日期",
		lx_date			timestamp	"来校工作日期",
		main_dept		varchar	"人事所在单位",
		name				varchar	"姓名",
		nation			varchar	"民族",
		nation_code		varchar	"民族代码",
		person_sort		varchar	"编制类别",
		person_sort_code		varchar	"编制类别代码",
		photo_works		list<varchar>,
		polity			varchar	"政治面貌",
		polity_code		varchar	"政治面貌代码",
		quit_date		timestamp	"离校日期",
		retire_date		timestamp	"人员离退休日期",
		sex					varchar	"性别",
		sex_code		varchar	"性别代码",
		staff_from		varchar	"教职工来源",
		staff_from_code		varchar	"教职工来源代码",
		staff_type		varchar	"人员分类",
		staff_type_code		varchar	"人员分类代码",
		status			varchar	"人员状态",
		status_code		varchar	"人员状态代码",
		subject_first		varchar	"一级学科",
		subject_first_code		varchar	"一级学科代码",
		subject_second		varchar	"二级学科",
		subject_second_code		varchar	"二级学科代码",
		sz_g				varchar	"师资归属单位",
		xw_dept			varchar	"学位授予单位",
		
		index( account,actual_quit_date,age,birthday,deceased_date,degree_level,degree_level_code,is_last_degree,is_last_degree_code,join_u_date,lx_date,main_dept,name,nation,nation_code,person_sort,person_sort_code,photo_works,polity,polity_code,quit_date,retire_date,sex,sex_code,staff_from,staff_from_code,staff_type,staff_type_code,status,status_code,subject_first,subject_first_code,subject_second,subject_second_code,sz_g,xw_dept) 

)with core=memory , autosearch=true , version=false , key=manu, alias='教职工基本信息' , nickname='univ_demo_person' 
;


create edge type if not exists univ_demo.person_to_org
;

