| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- DROP TABLE IF EXISTS `xhMain`;
- CREATE TABLE IF NOT EXISTS `xhMain`(
- id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
- `balance` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '余额',
- `freezeBalance` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '提现时被冻结的余额',
- `txBalance` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '可提现余额',
- `fixBalance` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '只能向推荐人消费的余额,指定余额',
- `totalRecharge` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '累计充值',
- `totalIncome` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '累计收入',
- `totalExpend` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '总支出',
- `totalItem` INT(11) NOT NULL DEFAULT '0' COMMENT '总花材数',
- `totalSale` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '累计销售额',
- `totalStockIn` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '累计入库',
- `totalStockOut` DECIMAL(9,2) NOT NULL DEFAULT '0.00' COMMENT '累计出库',
- `cashName` varchar(100) NOT NULL DEFAULT '' COMMENT '收款人姓名',
- `cashAccount` varchar(50) NOT NULL DEFAULT '' COMMENT '银行卡号,银行帐号',
- `cashBank` varchar(50) NOT NULL DEFAULT '' COMMENT '开户行',
- `addTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
- `updateTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
- )COMMENT='中央,中控';
- === shish 20220311
- ALTER TABLE xhStatSale ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhStatSaleMonth ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhStatUser ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhStatUserMonth ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhStatOut ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhStatOutMonth ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhPtYeChange ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhShopYeChange ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhShopCapital ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhCash ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhRecharge ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhStaff ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhGhsStatYj ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhGhsStatYjMonth ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhStatVisit ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhStatVisitMonth ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhGhsStatOrderCount ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhStatOrder ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhStatOrderCount ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhStatOrderMonth ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhStatIncome ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- ALTER TABLE xhStatIncomeMonth ADD mainId INT NOT NULL DEFAULT 0 COMMENT '中央id' AFTER `shopId`;
- === 资产相关表中央化 shish 20220313
- 执行供货商资产中央化 ./yii init/ghs-center 【库存也要中央化处理,要加入时来】!!!!
- DROP TABLE IF EXISTS `xhStaffMap`;
- CREATE TABLE `xhStaffMap` (
- `id` INT(11) NOT NULL AUTO_INCREMENT,
- `staffId` INT(11) NOT NULL DEFAULT '0' COMMENT '员工id',
- `sjId` INT(11) NOT NULL DEFAULT '0' COMMENT '商家id',
- `shopId` INT(11) NOT NULL DEFAULT '0' COMMENT '门店id',
- `ptStyle` TINYINT(4) NOT NULL DEFAULT '1' COMMENT '所属平台 1花店 2供货商 请查看dict.php',
- `addTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间',
- `updateTime` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
- PRIMARY KEY (`id`)
- ) COMMENT='门店员工关系';
- ALTER TABLE xhStaff COMMENT '员工';
- ==== 员工中央化 shish 20223013
|