修改了sql表中错误的字段
This commit is contained in:
parent
52bb2b6b51
commit
c3b9ea95d9
|
@ -154,7 +154,7 @@ create table if not exists manicurist
|
|||
id BIGINT AUTO_INCREMENT COMMENT '美甲师唯一标识(主键,自增)' PRIMARY KEY,
|
||||
userId BIGINT not null comment '用户ID(关联用户表)',
|
||||
businessId bigint not null comment '商家id',
|
||||
name VARCHAR(100) not null comment '美甲师姓名',
|
||||
manicuristName VARCHAR(100) not null comment '美甲师姓名',
|
||||
gender tinyint null comment '性别',
|
||||
manicuristAvatar VARCHAR(255) COMMENT '美甲师头像文件的存储路径或链接',
|
||||
phone VARCHAR(20) COMMENT '美甲师联系电话',
|
||||
|
@ -163,8 +163,8 @@ create table if not exists manicurist
|
|||
specialties VARCHAR(255) comment '美甲师的专长(如法式美甲、彩绘等)',
|
||||
rating DECIMAL(3, 2) comment '美甲师的服务评分',
|
||||
salary DECIMAL(10, 2) comment '美甲师的基本薪资',
|
||||
manStatus int DEFAULT 0 comment'美甲师状态 0 表示正常 1 表示禁用',
|
||||
isDelete TINYINT DEFAULT 0 comment '逻辑删除标志,0 表示未删除,1 表示已删除',
|
||||
manStatus int DEFAULT 0 comment '美甲师状态 0 表示正常 1 表示禁用',
|
||||
isDelete TINYINT DEFAULT 0 comment '逻辑删除标志,0 表示未删除,1 表示已删除',
|
||||
createTime DATETIME DEFAULT CURRENT_TIMESTAMP not null comment '记录创建时间',
|
||||
updateTime DATETIME DEFAULT CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '记录更新时间',
|
||||
INDEX idx_userId (userId)
|
||||
|
@ -179,30 +179,30 @@ create table if not exists manicurist_auth
|
|||
certificate_path VARCHAR(255) COMMENT '证书文件的存储路径或链接',
|
||||
createTime DATETIME default CURRENT_TIMESTAMP not null comment '记录创建时间',
|
||||
updateTime DATETIME default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '记录更新时间',
|
||||
isDelete TINYINT default 0 comment '逻辑删除标志,0 表示未删除,1 表示已删除',
|
||||
isDelete TINYINT default 0 comment '逻辑删除标志,0 表示未删除,1 表示已删除',
|
||||
INDEX idx_artistId (artistId)
|
||||
) comment ='美甲师认证表' COLLATE = utf8mb4_unicode_ci;
|
||||
|
||||
ALTER TABLE manicurist ADD COLUMN manStatus INT DEFAULT 0;
|
||||
|
||||
-- 预约表
|
||||
CREATE TABLE IF NOT EXISTS appointments
|
||||
(
|
||||
id BIGINT AUTO_INCREMENT COMMENT '预约ID' PRIMARY KEY,
|
||||
userId BIGINT NOT NULL COMMENT '用户ID(关联用户表)',
|
||||
userName VARCHAR(100) NOT NULL COMMENT '用户姓名',
|
||||
phone varchar(64) NOT NULL COMMENT '手机号',
|
||||
businessId BIGINT NOT NULL COMMENT '商家ID(关联商家表)',
|
||||
manicuristId BIGINT COMMENT '美甲师ID, 如果为空到店分配',
|
||||
appointmentTime DATETIME NOT NULL COMMENT '预约时间',
|
||||
serviceMode TINYINT NOT NULL COMMENT '服务方式(0 - 线上, 1 - 到店)',
|
||||
payMethod TINYINT NOT NULL COMMENT '支付方式:0微信支付',
|
||||
notes varchar(128) COMMENT '备注',
|
||||
status TINYINT DEFAULT 0 NOT NULL COMMENT '预约状态(0 - 已确认, 1 - 已完成, 2 - 已取消)',
|
||||
createTime DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL COMMENT '创建时间',
|
||||
updateTime DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||
isDelete TINYINT DEFAULT 0 NOT NULL COMMENT '是否删除',
|
||||
orderId BIGINT COMMENT '订单ID(关联订单表)',
|
||||
id bigint auto_increment comment '预约ID'primary key,
|
||||
userId bigint not null comment '用户ID(关联用户表)',
|
||||
userName varchar(100) not null comment '用户姓名',
|
||||
phone varchar(64) not null comment '手机号',
|
||||
businessId bigint not null comment '商家ID(关联商家表)',
|
||||
businessName varchar(512) null comment '商家名称',
|
||||
manicuristId bigint null comment '美甲师ID, 如果为空到店分配',
|
||||
manicuristName varchar(100) null comment '美甲师姓名',
|
||||
appointmentTime datetime not null comment '预约时间',
|
||||
serviceMode tinyint default 1 not null comment '服务方式(0 - 线上, 1 - 到店)',
|
||||
notes varchar(128) null comment '备注',
|
||||
status tinyint default 0 not null comment '预约状态(0 - 已确认, 1 - 已完成, 2 - 已取消)',
|
||||
createTime datetime default CURRENT_TIMESTAMP not null comment '创建时间',
|
||||
updateTime datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
|
||||
isDelete tinyint default 0 not null comment '是否删除',
|
||||
orderId bigint null comment '订单ID(关联订单表)',
|
||||
INDEX idx_userId (userId),
|
||||
INDEX idx_businessId (businessId),
|
||||
INDEX idx_manicuristId (manicuristId),
|
||||
|
@ -219,6 +219,7 @@ CREATE TABLE IF NOT EXISTS orders
|
|||
businessId bigint not null comment '商家id',
|
||||
userName VARCHAR(100) NOT NULL COMMENT '用户姓名',
|
||||
phone varchar(64) not null comment '手机号',
|
||||
payMethod TINYINT NOT NULL COMMENT '支付方式:0微信支付',
|
||||
appointmentId BIGINT NULL COMMENT '预约ID(关联预约表)',
|
||||
totalPrice DECIMAL(10, 2) NOT NULL COMMENT '订单总金额',
|
||||
paymentStatus TINYINT DEFAULT 0 NOT NULL COMMENT '支付状态(0 - 未支付, 1 - 已支付, 2 - 退款中, 3 - 已退款)',
|
||||
|
@ -231,6 +232,7 @@ CREATE TABLE IF NOT EXISTS orders
|
|||
INDEX idx_appointmentId (appointmentId)
|
||||
) COMMENT '订单表' COLLATE = utf8mb4_unicode_ci;
|
||||
|
||||
|
||||
-- 订单详情表
|
||||
CREATE TABLE IF NOT EXISTS order_items
|
||||
(
|
||||
|
@ -256,6 +258,7 @@ CREATE TABLE IF NOT EXISTS order_claim
|
|||
manicuristId BIGINT NOT NULL COMMENT '美甲师ID(关联美甲师表)',
|
||||
claimStatus TINYINT DEFAULT 0 NOT NULL COMMENT '抢单状态(0 - 待抢单, 1 - 已抢单, 2 - 已分配, 3 - 放弃)',
|
||||
claimTime DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '抢单时间',
|
||||
isDelete TINYINT DEFAULT 0 NOT NULL COMMENT '是否删除',
|
||||
INDEX idx_orderId (orderId),
|
||||
INDEX idx_manicuristId (manicuristId)
|
||||
) COMMENT '抢单记录表' COLLATE = utf8mb4_unicode_ci;
|
||||
|
|
Loading…
Reference in New Issue
Block a user