jiesi6-object-server
v1.0.7
Published
create table object_class ( id int(10) unsigned not null auto_increment, create_time datetime not null default current_timestamp, name varchar(255) default null, scope varchar(100) default null, code varchar(100) not null, primary key(id) ) en
Downloads
5
Readme
#jiesi6-object-server
create table object_class ( id int(10) unsigned not null auto_increment, create_time datetime not null default current_timestamp, name varchar(255) default null, scope varchar(100) default null, code varchar(100) not null, primary key(id) ) engine=innodb auto_increment=10 default charset=utf8mb4; insert into object_class(id, name, code ) values (1, '对象类', 'object_class'), (2, '对象类属性', 'object_class_property');
create table object_class_property ( id int(10) unsigned not null auto_increment, create_time datetime not null default current_timestamp, body_id int(10) unsigned not null, name varchar(255) default null, code varchar(100) not null, type int(11) default null, object_class_id int(10) unsigned default null, foreign_name varchar(255) default null, object_key varchar(255) default null, relation_key varchar(255) default null, unique_key varchar(255) default null, pass_type varchar(255) default null, primary key(id), unique key object_class_property_body_id_code(body_id, code), constraint object_class_property_body_id_foreign foreign key(body_id) references object_class(id) on delete cascade, constraint object_class_property_object_class_id_foreign foreign key(object_class_id) references object_class(id) ) engine=innodb auto_increment=100 default charset=utf8mb4;
insert into object_class_property(id, body_id, name, code, type) values (1, 1, '类名', 'name', 1), (2, 1, '范围', 'scope', 1), (3, 1, '代码', 'code', 1);
insert into object_class_property(id, body_id, name, code, type, object_class_id, object_key, relation_key, unique_key) values (4, 1, '属性', 'property', 200, 2, 'id', 'body_id', 'code');
insert into object_class_property(id, body_id, name, code, type, foreign_name, object_class_id) values (5, 2, '对象', 'body_id', 100, 'object_class_property_body_id_foreign', 1);
insert into object_class_property(id, body_id, name, code, type) values (6, 2, '属性名', 'name', 1), (7, 2, '代码', 'code', 1), (8, 2, '类型', 'type', 2);
insert into object_class_property(id, body_id, name, code, type, foreign_name, object_class_id) values (9, 2, '关联对象', 'object_class_id', 100, 'object_class_property_object_class_id_foreign', 1);
insert into object_class_property(id, body_id, name, code, type) values (10, 2, '外键名', 'foreign_name', 1), (11, 2, '当前对象中的关联键', 'object_key', 1), (12, 2, '集合对象中的关联键', 'relation_key', 1), (13, 2, '集合对象的唯一键', 'unique_key', 1), (14, 2, '通道类型', 'pass_type', 1);