更新数据模型

This commit is contained in:
shuzheng 2017-01-11 14:59:02 +08:00
parent a211e8c5e2
commit f1466e30f1
4 changed files with 67 additions and 67 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{22E867D0-73E2-4C77-BB68-28135519D681}" Label="" LastModificationDate="1483886263" Name="zheng" Objects="409" Symbols="69" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<?PowerDesigner AppLocale="UTF16" ID="{22E867D0-73E2-4C77-BB68-28135519D681}" Label="" LastModificationDate="1484116483" Name="zheng" Objects="398" Symbols="69" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<!-- do not edit this file -->
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
@ -5595,7 +5595,7 @@ LABL 0 新宋体,8,N</a:FontList>
<a:CreationDate>1483885645</a:CreationDate>
<a:ModificationDate>1483885753</a:ModificationDate>
<a:IconMode>-1</a:IconMode>
<a:Rect>((48219,-275), (62071,3724))</a:Rect>
<a:Rect>((47640,-275), (62650,3724))</a:Rect>
<a:LineColor>12615680</a:LineColor>
<a:FillColor>16570034</a:FillColor>
<a:ShadowColor>12632256</a:ShadowColor>
@ -5625,12 +5625,12 @@ LABL 0 新宋体,8,N</a:FontList>
<c:Tables>
<o:Table Id="o97">
<a:ObjectID>E44EC95B-C39E-4250-9105-F687FD1FDEDD</a:ObjectID>
<a:Name>test_book 书</a:Name>
<a:Code>test_book</a:Code>
<a:Name>cms_book 书</a:Name>
<a:Code>cms_book</a:Code>
<a:CreationDate>1478091704</a:CreationDate>
<a:Creator>shuzheng</a:Creator>
<a:ModificationDate>1482062983</a:ModificationDate>
<a:Modifier>shuzheng</a:Modifier>
<a:ModificationDate>1484116476</a:ModificationDate>
<a:Modifier>admin</a:Modifier>
<a:Comment>书</a:Comment>
<a:PhysicalOptions>ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4 COMMENT=&#39;用户书籍表&#39;</a:PhysicalOptions>
<a:TotalSavingCurrency/>
@ -6862,12 +6862,12 @@ LABL 0 新宋体,8,N</a:FontList>
</o:Table>
<o:Table Id="o105">
<a:ObjectID>82A32332-0F7E-41C0-91D3-8E359F5EA2F6</a:ObjectID>
<a:Name>test_user 用户</a:Name>
<a:Code>test_user</a:Code>
<a:Name>cms_user 用户</a:Name>
<a:Code>cms_user</a:Code>
<a:CreationDate>1478091704</a:CreationDate>
<a:Creator>shuzheng</a:Creator>
<a:ModificationDate>1482062976</a:ModificationDate>
<a:Modifier>shuzheng</a:Modifier>
<a:ModificationDate>1484116483</a:ModificationDate>
<a:Modifier>admin</a:Modifier>
<a:Comment>用户</a:Comment>
<a:PhysicalOptions>ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COMMENT=&#39;用户表&#39;</a:PhysicalOptions>
<a:TotalSavingCurrency/>
@ -8625,10 +8625,10 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Column Id="o321">
<a:ObjectID>FFB6C465-D476-497F-B0FE-C482934511FE</a:ObjectID>
<a:Name>键</a:Name>
<a:Code>key</a:Code>
<a:Code>setting_key</a:Code>
<a:CreationDate>1483885647</a:CreationDate>
<a:Creator>shuzheng</a:Creator>
<a:ModificationDate>1483885745</a:ModificationDate>
<a:ModificationDate>1483886453</a:ModificationDate>
<a:Modifier>shuzheng</a:Modifier>
<a:DataType>varchar(10)</a:DataType>
<a:Length>10</a:Length>
@ -8636,10 +8636,10 @@ LABL 0 新宋体,8,N</a:FontList>
<o:Column Id="o322">
<a:ObjectID>64A4C1BB-4D92-47BC-B306-3242C9599FD8</a:ObjectID>
<a:Name>值</a:Name>
<a:Code>value</a:Code>
<a:Code>setting_value</a:Code>
<a:CreationDate>1483885647</a:CreationDate>
<a:Creator>shuzheng</a:Creator>
<a:ModificationDate>1483885745</a:ModificationDate>
<a:ModificationDate>1483886453</a:ModificationDate>
<a:Modifier>shuzheng</a:Modifier>
<a:DataType>varchar(500)</a:DataType>
<a:Length>500</a:Length>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{22E867D0-73E2-4C77-BB68-28135519D681}" Label="" LastModificationDate="1483886453" Name="zheng" Objects="409" Symbols="69" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<?PowerDesigner AppLocale="UTF16" ID="{22E867D0-73E2-4C77-BB68-28135519D681}" Label="" LastModificationDate="1484116510" Name="zheng" Objects="398" Symbols="69" Target="MySQL 5.0" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<!-- do not edit this file -->
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
@ -12,8 +12,8 @@
<a:Code>zheng</a:Code>
<a:CreationDate>1478091682</a:CreationDate>
<a:Creator>shuzheng</a:Creator>
<a:ModificationDate>1483885645</a:ModificationDate>
<a:Modifier>shuzheng</a:Modifier>
<a:ModificationDate>1484116510</a:ModificationDate>
<a:Modifier>admin</a:Modifier>
<a:PackageOptionsText>[FolderOptions]
[FolderOptions\Physical Objects]
@ -87,7 +87,7 @@ GenScriptName6=
GenScriptName7=
GenScriptName8=
GenScriptName9=
GenPathName=C:\Users\shuzheng\Desktop\
GenPathName=C:\Users\admin\Desktop\
GenSingleFile=Yes
GenODBC=No
GenCheckModel=Yes
@ -5625,12 +5625,12 @@ LABL 0 新宋体,8,N</a:FontList>
<c:Tables>
<o:Table Id="o97">
<a:ObjectID>E44EC95B-C39E-4250-9105-F687FD1FDEDD</a:ObjectID>
<a:Name>test_book 书</a:Name>
<a:Code>test_book</a:Code>
<a:Name>cms_book 书</a:Name>
<a:Code>cms_book</a:Code>
<a:CreationDate>1478091704</a:CreationDate>
<a:Creator>shuzheng</a:Creator>
<a:ModificationDate>1482062983</a:ModificationDate>
<a:Modifier>shuzheng</a:Modifier>
<a:ModificationDate>1484116476</a:ModificationDate>
<a:Modifier>admin</a:Modifier>
<a:Comment>书</a:Comment>
<a:PhysicalOptions>ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4 COMMENT=&#39;用户书籍表&#39;</a:PhysicalOptions>
<a:TotalSavingCurrency/>
@ -6862,12 +6862,12 @@ LABL 0 新宋体,8,N</a:FontList>
</o:Table>
<o:Table Id="o105">
<a:ObjectID>82A32332-0F7E-41C0-91D3-8E359F5EA2F6</a:ObjectID>
<a:Name>test_user 用户</a:Name>
<a:Code>test_user</a:Code>
<a:Name>cms_user 用户</a:Name>
<a:Code>cms_user</a:Code>
<a:CreationDate>1478091704</a:CreationDate>
<a:Creator>shuzheng</a:Creator>
<a:ModificationDate>1482062976</a:ModificationDate>
<a:Modifier>shuzheng</a:Modifier>
<a:ModificationDate>1484116483</a:ModificationDate>
<a:Modifier>admin</a:Modifier>
<a:Comment>用户</a:Comment>
<a:PhysicalOptions>ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COMMENT=&#39;用户表&#39;</a:PhysicalOptions>
<a:TotalSavingCurrency/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 417 KiB

After

Width:  |  Height:  |  Size: 442 KiB

View File

@ -1,6 +1,6 @@
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2017/1/8 22:41:06 */
/* Created on: 2017/1/11 14:35:11 */
/*==============================================================*/
@ -10,6 +10,8 @@ drop table if exists cms_article_category;
drop table if exists cms_article_tag;
drop table if exists cms_book;
drop table if exists cms_category;
drop table if exists cms_category_tag;
@ -22,6 +24,8 @@ drop table if exists cms_setting;
drop table if exists cms_tag;
drop table if exists cms_user;
drop table if exists pay_in_order;
drop table if exists pay_in_order_detail;
@ -40,10 +44,6 @@ drop table if exists pay_vendor;
drop table if exists pay_vest;
drop table if exists test_book;
drop table if exists test_user;
drop table if exists upms_organization;
drop table if exists upms_permission;
@ -121,6 +121,21 @@ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文章标签表';
alter table cms_article_tag comment '文章标签关联表';
/*==============================================================*/
/* Table: cms_book */
/*==============================================================*/
create table cms_book
(
book_id int(10) unsigned not null auto_increment comment '编号',
user_id int(10) unsigned not null comment '用户编号',
name varchar(45) not null comment '书名',
primary key (book_id),
key FK_book_1 (user_id)
)
ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4 COMMENT='用户书籍表';
alter table cms_book comment '';
/*==============================================================*/
/* Table: cms_category */
/*==============================================================*/
@ -235,6 +250,24 @@ ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='标签表';
alter table cms_tag comment '标签表';
/*==============================================================*/
/* Table: cms_user */
/*==============================================================*/
create table cms_user
(
user_id int(10) unsigned not null auto_increment comment '编号',
username varchar(32) default NULL comment '账号',
password varchar(32) default NULL comment '密码',
nickname varchar(32) default NULL comment '昵称',
sex int(11) default NULL comment '0未知,1男,2女',
ctime bigint(20) default NULL comment '创建时间',
content text comment '备注',
primary key (user_id)
)
ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COMMENT='用户表';
alter table cms_user comment '用户';
/*==============================================================*/
/* Table: pay_in_order */
/*==============================================================*/
@ -367,39 +400,6 @@ create table pay_vest
alter table pay_vest comment '马甲支付参数配置表';
/*==============================================================*/
/* Table: test_book */
/*==============================================================*/
create table test_book
(
book_id int(10) unsigned not null auto_increment comment '编号',
user_id int(10) unsigned not null comment '用户编号',
name varchar(45) not null comment '书名',
primary key (book_id),
key FK_book_1 (user_id)
)
ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4 COMMENT='用户书籍表';
alter table test_book comment '';
/*==============================================================*/
/* Table: test_user */
/*==============================================================*/
create table test_user
(
user_id int(10) unsigned not null auto_increment comment '编号',
username varchar(32) default NULL comment '账号',
password varchar(32) default NULL comment '密码',
nickname varchar(32) default NULL comment '昵称',
sex int(11) default NULL comment '0未知,1男,2女',
ctime bigint(20) default NULL comment '创建时间',
content text comment '备注',
primary key (user_id)
)
ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COMMENT='用户表';
alter table test_user comment '用户';
/*==============================================================*/
/* Table: upms_organization */
/*==============================================================*/
@ -537,6 +537,9 @@ alter table cms_article_tag add constraint FK_Reference_3 foreign key (article_i
alter table cms_article_tag add constraint FK_Reference_4 foreign key (tag_id)
references cms_tag (tag_id) on delete cascade on update cascade;
alter table cms_book add constraint FK_Reference_9 foreign key (user_id)
references cms_user (user_id) on delete cascade on update cascade;
alter table cms_category add constraint FK_Reference_10 foreign key (pid)
references cms_category (category_id) on delete set null on update restrict;
@ -582,9 +585,6 @@ alter table pay_type add constraint FK_Reference_12 foreign key (pay_vendor_id)
alter table pay_vest add constraint FK_Reference_14 foreign key (pay_type_id)
references pay_type (pay_type_id) on delete restrict on update restrict;
alter table test_book add constraint FK_Reference_9 foreign key (user_id)
references test_user (user_id) on delete cascade on update cascade;
alter table upms_organization add constraint FK_Reference_15 foreign key (system_id)
references upms_system (system_id) on delete restrict on update restrict;