

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

CREATE CLASS IF NOT EXISTS  /casemgr/bankAccount(
  id varchar "账户ID",
	account_number	varchar	"银行账号",
	name varchar "账户名称",
	account_type varchar "账户类型",
	bank_name varchar "开户行",
	bank_branch varchar "开户支行",
	status int "账户状态。1-正常，0-冻结/停用"
)with ttl=366 day , autosearch=true , core=memory, alias='bankAccount', nickname='bankAccount';

CREATE CLASS IF NOT EXISTS  /casemgr/person(
  id varchar "人员ID",
	name varchar "名称",
	id_card_type varchar "证件类型:居民身份证、护照、军官证",
	id_card_number varchar "证件号",
	gender varchar "性别。M-男，F-女，U-未知",
	mobile_phone person "手机号码",
	bankAccount bankAccount "银行账户"
)with ttl=366 day , autosearch=true , core=memory, alias='person', nickname='person';

CREATE CLASS IF NOT EXISTS  /casemgr/company(
  id varchar "公司ID",
	name	varchar	"公司名称",
	taxNumber varchar "纳税人识别号",
	bankAccount bankAccount "银行账户",
	bankName varchar "开户行",
	legalPerson person "法人代表",
	address varchar "公司地址",
	contactPhone varchar "联系电话"
)with ttl=366 day , autosearch=true , core=memory, alias='casecompany', nickname='casecompany';

CREATE CLASS IF NOT EXISTS  /casemgr/case(
	name	varchar	"案件名称",
	principal	varchar	"案件负责人",
	department	varchar	     "所属科室",
	ctime	date	"创建时间",
	subjectObj  casecompany "主体公司"
)with ttl=366 day , autosearch=true , core=memory, alias='case', nickname='case';


desc class /casemgr/ *
/**
output()
**/
;
