3 Star 0 Fork 0

zhouxy109/RuiKai

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
maintain_manager.sql 9.12 KB
一键复制 编辑 原始数据 按行查看 历史
zhouxy109 提交于 2020-10-13 19:20 . 格式化 sql 文件。
-- Dumping database structure for maintain_manager
CREATE DATABASE IF NOT EXISTS `maintain_manager`;
USE `maintain_manager`;
-- Dumping structure for table maintain_manager.ma_admin_company
CREATE TABLE IF NOT EXISTS `ma_admin_company`
(
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '客户主键',
`password` VARCHAR(100) DEFAULT NULL COMMENT '用户密码',
`company_name` VARCHAR(30) DEFAULT NULL COMMENT '公司名字',
`company_phone` VARCHAR(30) DEFAULT NULL COMMENT '公司电话',
`company_address` VARCHAR(300) DEFAULT NULL COMMENT '公司地址',
`create_time` DATETIME DEFAULT NULL COMMENT '注册时间',
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
ROW_FORMAT = DYNAMIC COMMENT ='客户公司表';
INSERT INTO `ma_admin_company` (`id`, `password`, `company_name`, `company_phone`, `company_address`, `create_time`)
VALUES (1, '123', '瑞凯', '131XXXXXXXX', '1', '2020-10-13 00:30:20');
-- Dumping structure for table maintain_manager.ma_admin_company_authority
CREATE TABLE IF NOT EXISTS `ma_admin_company_authority`
(
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`admin_company` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`authority_id` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4;
-- Dumping structure for table maintain_manager.ma_admin_company_copy1
CREATE TABLE IF NOT EXISTS `ma_admin_company_copy1`
(
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '客户主键',
`password` VARCHAR(100) DEFAULT NULL COMMENT '用户密码',
`company_name` VARCHAR(30) DEFAULT NULL COMMENT '公司名字',
`company_phone` VARCHAR(30) DEFAULT NULL COMMENT '公司电话',
`company_address` VARCHAR(300) DEFAULT NULL COMMENT '公司地址',
`create_time` DATETIME DEFAULT NULL COMMENT '注册时间',
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
ROW_FORMAT = DYNAMIC COMMENT ='客户公司表';
-- Dumping structure for table maintain_manager.ma_admin_employee
CREATE TABLE IF NOT EXISTS `ma_admin_employee`
(
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '员工 id',
`company_id` BIGINT UNSIGNED NOT NULL COMMENT '员工所在公司标识',
`password` VARCHAR(100) NOT NULL COMMENT '用户密码',
`user_name` VARCHAR(30) DEFAULT NULL COMMENT '用户姓名',
`user_uname` VARCHAR(30) DEFAULT NULL COMMENT '老板备注的名字',
`create_time` DATETIME DEFAULT NULL COMMENT '注册时间',
`is_delete` TINYINT(1) DEFAULT 0 COMMENT '是否辞职,{"0":"否","1":"是"}',
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
ROW_FORMAT = DYNAMIC COMMENT ='客户员工表';
-- Dumping structure for table maintain_manager.ma_admin_employee_authority
CREATE TABLE IF NOT EXISTS `ma_admin_employee_authority`
(
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`admin_employee` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`authority_id` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
ROW_FORMAT = DYNAMIC;
-- Dumping structure for table maintain_manager.ma_authority
CREATE TABLE IF NOT EXISTS `ma_authority`
(
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`permission_name` VARCHAR(256) DEFAULT NULL,
`permission_url` VARCHAR(256) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='权限表';
-- Dumping structure for table maintain_manager.ma_customer_company
CREATE TABLE IF NOT EXISTS `ma_customer_company`
(
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '客户主键',
`password` VARCHAR(100) DEFAULT NULL COMMENT '用户密码',
`company_name` VARCHAR(30) DEFAULT NULL COMMENT '公司名字',
`company_phone` VARCHAR(30) DEFAULT NULL COMMENT '公司电话',
`company_address` VARCHAR(300) DEFAULT NULL COMMENT '公司地址',
`create_time` DATETIME DEFAULT NULL COMMENT '注册时间',
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
ROW_FORMAT = DYNAMIC COMMENT ='客户公司表';
-- Dumping structure for table maintain_manager.ma_customer_company_authority
CREATE TABLE IF NOT EXISTS `ma_customer_company_authority`
(
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`customer_company` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`authority_id` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
ROW_FORMAT = DYNAMIC;
-- Dumping structure for table maintain_manager.ma_customer_employee
CREATE TABLE IF NOT EXISTS `ma_customer_employee`
(
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '员工 id',
`company_id` BIGINT UNSIGNED NOT NULL COMMENT '员工所在公司标识',
`password` VARCHAR(100) NOT NULL COMMENT '用户密码',
`user_name` VARCHAR(30) DEFAULT NULL COMMENT '用户姓名',
`user_uname` VARCHAR(30) DEFAULT NULL COMMENT '老板备注的名字',
`create_time` DATETIME DEFAULT NULL COMMENT '注册时间',
`is_delete` TINYINT(1) DEFAULT 0 COMMENT '是否辞职,{"0":"否","1":"是"}',
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
ROW_FORMAT = DYNAMIC COMMENT ='客户员工表';
-- Dumping structure for table maintain_manager.ma_customer_employee_authority
CREATE TABLE IF NOT EXISTS `ma_customer_employee_authority`
(
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
`customer_employee` BIGINT UNSIGNED NOT NULL DEFAULT 0,
`authority_id` BIGINT UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4
ROW_FORMAT = DYNAMIC;
-- Dumping structure for table maintain_manager.ma_maintain_order
CREATE TABLE IF NOT EXISTS `ma_maintain_order`
(
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '维修订单id',
`user_phone` VARCHAR(30) DEFAULT NULL COMMENT '客户电话',
`product_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '产品id',
`operate_name` VARCHAR(30) DEFAULT NULL COMMENT '操作人',
`customer_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '客户公司 id',
`maintain_way` TINYINT(4) DEFAULT NULL COMMENT '维修方式,{"0":"自送修","1":"配送","2":"上门维修"}',
`maintain_part` VARCHAR(30) DEFAULT NULL COMMENT '故障部位',
`company_address` VARCHAR(300) DEFAULT NULL COMMENT '地址',
`img_dir` VARCHAR(300) DEFAULT NULL COMMENT '图片地址',
`video_dir` VARCHAR(100) DEFAULT NULL COMMENT '视频地址',
`order_start_time` DATETIME DEFAULT NULL COMMENT '订单开始时间',
`order_end_time` DATETIME DEFAULT NULL COMMENT '订单结束时间',
`order_status` TINYINT(4) DEFAULT NULL COMMENT '订单状态,{"0":"已报备","1":"进行中","2":"已完成"}',
`note` VARCHAR(300) DEFAULT NULL COMMENT '故障描述',
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='故障报修表';
-- Dumping structure for table maintain_manager.ma_product
CREATE TABLE IF NOT EXISTS `ma_product`
(
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '产品编号',
`product_name` VARCHAR(40) DEFAULT NULL COMMENT '产品名称',
`color` VARCHAR(30) DEFAULT NULL COMMENT '颜色',
`version` VARCHAR(30) DEFAULT NULL COMMENT '版本',
`spec` VARCHAR(200) DEFAULT NULL COMMENT '产品规格',
`product_class` VARCHAR(30) DEFAULT NULL COMMENT '产品分类',
`img_dir` VARCHAR(1000) DEFAULT NULL COMMENT '产品图片路径',
`retail_price` DECIMAL(10, 2) DEFAULT 0.00 COMMENT '零售价',
`renew_price` DECIMAL(10, 2) DEFAULT 0.00 COMMENT '续费价',
`stock` INT(10) DEFAULT 0 COMMENT '库存',
`monthly_sales` INT(10) DEFAULT 0 COMMENT '月销量',
`total_sales` INT(10) DEFAULT 0 COMMENT '总销量',
`create_time` DATETIME DEFAULT NULL COMMENT '创建时间',
`note` VARCHAR(1000) DEFAULT NULL COMMENT '产品描述',
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='产品表';
-- Dumping structure for table maintain_manager.ma_renew_order
CREATE TABLE IF NOT EXISTS `ma_renew_order`
(
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '续费表id',
`customer_company_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '客户公司 id',
`customer_employee_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '客户员工 id;如果是老板自己办的,则保留 NULL',
`product_id` BIGINT UNSIGNED DEFAULT NULL COMMENT '产品id',
`order_start_time` DATETIME DEFAULT NULL COMMENT '订单时间',
`order_end_time` DATETIME DEFAULT NULL COMMENT '到期时间',
`renew_time` DATETIME DEFAULT NULL COMMENT '续费时长',
`note` VARCHAR(300) DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8mb4 COMMENT ='续费表';
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/zhouxy109/rui-kai.git
git@gitee.com:zhouxy109/rui-kai.git
zhouxy109
rui-kai
RuiKai
master

搜索帮助