From 41ce9f5b2b743427f677115dcc7eeb85caa51c82 Mon Sep 17 00:00:00 2001 From: hodong13 Date: Fri, 6 Nov 2020 04:44:32 +0000 Subject: [PATCH] --- Dao/DB/DB1.Scheme.txt | 55 +++++++++++++++++++++++++++++++++++++++++ Dao/DB/DB1.SchemeFK.txt | 16 ++++++++++++ 2 files changed, 71 insertions(+) diff --git a/Dao/DB/DB1.Scheme.txt b/Dao/DB/DB1.Scheme.txt index 7387ece..02c901c 100644 --- a/Dao/DB/DB1.Scheme.txt +++ b/Dao/DB/DB1.Scheme.txt @@ -686,6 +686,47 @@ create table paycartgroup ( ,cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL ,primary key(pcno,userno)); +create table pplog ( + pplno bigint auto_increment not null + ,userno int not null + ,isready tinyint + ,cgcode varchar (20) + ,cshape tinyint + ,typeman smallint + ,typeedu smallint + ,typegrade smallint + ,typejob smallint + ,cgno smallint + ,cmisno bigint + ,isrebate tinyint + ,rbankname varchar (50) + ,rbankacc varbinary (200) + ,rbankowner varchar (20) + ,asname varchar (100) not null + ,brno char (10) + ,ceoname varchar (50) + ,post char (6) + ,address1 varchar (200) + ,address2 varchar (200) + ,btype varchar (50) + ,bkind varchar (50) + ,eino varchar (30) + ,mname varchar (30) + ,mphone varbinary (200) + ,taxemail varbinary (200) + ,userpno varbinary (200) + ,mobile varbinary (200) + ,email varbinary (200) + ,upost char (6) + ,uaddress1 varchar (200) + ,uaddress2 varchar (200) + ,isassignuser tinyint not null default 1 + ,uduty varchar (20) + ,slevel tinyint + ,cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL + ,primary key(pplno)); + + create table pay ( payno bigint auto_increment not null ,ptype tinyint not null @@ -726,6 +767,20 @@ create table pay ( ,iscanceled tinyint not null default 0 ,iscashrct tinyint null ,cashrcthp varbinary (200) null + + ,iscashrct tinyint + ,cashrcthp varbinary (200) + ,cgcode varchar (20) + ,cshape tinyint + ,typeman smallint + ,typeedu smallint + ,typegrade smallint + ,typejob smallint + ,cmisno bigint + ,isrebate tinyint + ,rbankname varchar (50) + ,rbankacc varbinary (200) + ,rbankowner varchar (20) ,cdt datetime not null,cno bigint not NULL,udt datetime not null,uno bigint not NULL,uip varchar(50) not NULL ,primary key(payno)); diff --git a/Dao/DB/DB1.SchemeFK.txt b/Dao/DB/DB1.SchemeFK.txt index fb3abbc..adb267d 100644 --- a/Dao/DB/DB1.SchemeFK.txt +++ b/Dao/DB/DB1.SchemeFK.txt @@ -95,8 +95,24 @@ alter table paycart add constraint foreign key fkpaycartu (userno) references us alter table paycart add constraint foreign key fkpaycartfg (fgno) references filegroup(fgno); alter table paycartgroup add constraint foreign key fkpaycartgrouppaycart (pcno) references paycart(pcno); alter table paycartgroup add constraint foreign key fkpaycartgroupu(userno) references users(userno); + +alter table pplog add constraint foreign key fkpplu(userno) references users(userno); +alter table pplog add constraint foreign key fkppltypeman(typeman) references comcode(ccode); +alter table pplog add constraint foreign key fkppltypeedu(typeedu) references comcode(ccode); +alter table pplog add constraint foreign key fkppltypegrade(typegrade) references comcode(ccode); +alter table pplog add constraint foreign key fkppltypejob(typejob) references comcode(ccode); +alter table pplog add constraint foreign key fkpplcg(cgno) references cg(cgno); +alter table pplog add constraint foreign key fkpplcminningscd(cmisno) references cminningscd(cmisno); + + alter table pay add constraint foreign key fkpayu(userno) references users(userno); +alter table pay add constraint foreign key fkpaycmtypeman(typeman) references comcode(ccode); +alter table pay add constraint foreign key fkpaycmtypeedu(typeedu) references comcode(ccode); +alter table pay add constraint foreign key fkpaycmtypegrade(typegrade) references comcode(ccode); +alter table pay add constraint foreign key fkpaycmtypejob(typejob) references comcode(ccode); +alter table pay add constraint foreign key fkpaycminningscd(cmisno) REFERENCES cminningscd(cmisno); + alter table paycertbook add constraint foreign key fkpaycertbookpay(payno) references pay(payno); alter table paycertbook add constraint foreign key fkpaycertbookbook(bkno) references book(bkno);