1 頁 (共 1 頁)

E3 dev cmz_001

發表於 : 2018-03-18 12:36:56
yehlu

代碼: 選擇全部

insert ignore bjn_tableState values('cmzBomItem',0,0,0,'');
create table if not exists `cmzBomItem` (
	`id` varchar(30) not null default '',
	`memo` varchar(250) not null default '',
	`swDel` tinyint unsigned not null default 0,

	`creater` varchar(20) not null default '',
	`createTime` datetime not null default '0001-0-0',
	`updater` varchar(20) not null default '',
	`updateTime` datetime not null default '0001-0-0',

	primary key (id)
)  ;
create table if not exists `cmzBomItemDetail` (
	`rela` varchar (30) not null default '',
	`no` smallint unsigned not null default 0,
	`itemId` varchar (30) not null default '',
	`qty` decimal(9,4) not null default 0,

	primary key (rela,no),
	index `ix_itemId` (itemId)
) ;

insert ignore bjn_tableState values('cmzZipCode',0,0,0,'');
create table if not exists `cmzZipCode` (
	`id` varchar(10) not null default '',
	`name` varchar(50) not null default '',
	`memo` varchar(100) not null default '',
	`swDel` tinyint unsigned not null default 0,

	`creater` varchar(20) not null default '',
	`createTime` datetime not null default '0001-0-0',
	`updater` varchar(20) not null default '',
	`updateTime` datetime not null default '0001-0-0',

    primary key (id)
)  ;
alter table member add `addrZipCode` varchar(10) not null default '';
alter table member add `accAddrZipCode` varchar(10) not null default '';
alter table member add `fixAddrZipCode` varchar(10) not null default '';
insert ignore bjn_tableState values('cmzMemberYearFee',0,0,0,'');
create table if not exists `cmzMemberYearFee` (
	`id` bigint unsigned not null ,
	`tsYear` varchar(10) not null default '',
	`memberId` varchar(20) not null default '',
	`money` decimal(14,4) not null default 0,
	`recHrId` varchar(10) not null default '',
	`recDate` date not null default '0001-0-0',
 	`swState` tinyint unsigned not null default 0,
 	`memo` varchar(100) not null default '',
	`swDel` tinyint unsigned not null default 0,

	`creater` varchar(20) not null default '',
	`createTime` datetime not null default '0001-0-0',
	`updater` varchar(20) not null default '',
	`updateTime` datetime not null default '0001-0-0',

	primary key (id),
	unique `ix_tsYear_memberId` (tsYear,memberId)
) ;