Commit 1edb672a by 仲光辉

feat: add some new SQL.

parent ef45a812
# # 2022.05.25
# # 2022.05.25
......@@ -4749,26 +4749,6 @@ CREATE INDEX idx_association_type ON recommended_in_association (association_typ
alter table recommended_in
modify publish_type int(1) not null comment '发布类型 0:全部 1:城市 2:项目';
CREATE TABLE recommended_in_record
(
uuid BIGINT(19) NOT NULL COMMENT '主键 uuid' PRIMARY KEY,
invitation_qr_code_uuid BIGINT(11) NOT NULL COMMENT '邀请二维码 ID',
invitation_qr_code_url VARCHAR(100) NOT NULL COMMENT '邀请二维码 地址',
invitation_qr_code_param_uuid BIGINT(19) NOT NULL COMMENT '邀请二维码 参数 uuid',
recommended_in_uuid BIGINT(11) NOT NULL COMMENT 'recommended_in uuid',
inviter_uuid VARCHAR(64) NULL COMMENT '邀请人 uuid',
invitee_uuid VARCHAR(64) NULL COMMENT '受邀人 uuid',
cumulative_invitations_count INT(5) NULL DEFAULT 0 COMMENT '累计邀请人数',
create_time DATETIME DEFAULT CURRENT_TIMESTAMP NULL COMMENT '创建时间',
update_time DATETIME DEFAULT CURRENT_TIMESTAMP NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
is_delete INT(1) DEFAULT 0 NULL COMMENT '是否删除: 0:未删 1:已删除 default:0'
) COMMENT '推荐入驻记录';
CREATE INDEX idx_recommended_in_uuid ON recommended_in_record (recommended_in_uuid);
CREATE INDEX idx_invitation_qr_code_uuid ON recommended_in_record (invitation_qr_code_uuid);
CREATE INDEX idx_inviter_uuid ON recommended_in_record (inviter_uuid);
CREATE TABLE product_service
(
uuid BIGINT(19) NOT NULL COMMENT '主键 uuid' PRIMARY KEY,
......@@ -4794,9 +4774,6 @@ alter table recommended_in
alter table recommended_in
add phone VARCHAR(30) null comment '电话';
alter table recommended_in_record
add expire_time DATETIME null comment '二维码过期时间';
alter table expand_data
modify data_system_name int(1) not null comment '数据在系统内的名称. 1.改造复原 2:天花板 3:墙面 4:形象墙 5:地面 6:照明设施 7:门窗 8:配电设施 9:门禁 10:家私损坏 11:门锁 12:其他 13:打印费及其他费用 14:家私缺陷/清理费用 15:清洁费用 16:商务服务费 17:是否办妥以租赁单元为注册地址或营业地址的工商注销或变更手续 18:应交商务服务费用 19:应交滞纳金及违约金 20:应交总结金额 21:交楼单验收项目 22: 企业资料 23: 推荐入驻商务小程序二维码 在系统内是一个枚举';
......@@ -4807,6 +4784,56 @@ alter table expand_data
modify data_type int(1) not null comment '数据类型.1:退租 2:交楼单 3: 企业资料 4: 推荐入驻商务小程序二维码 在系统内一个枚举值';
CREATE TABLE recommended_in_qr_code
(
uuid BIGINT(19) NOT NULL COMMENT '主键 uuid' PRIMARY KEY,
invitation_qr_code_url VARCHAR(100) NOT NULL COMMENT '邀请二维码 地址',
recommended_in_uuid BIGINT(11) NOT NULL COMMENT 'recommended_in uuid',
user_uuid VARCHAR(64) NULL COMMENT '二维码所属用户 user uuid',
cumulative_invitations_count INT(5) NULL DEFAULT 0 COMMENT '累计邀请人数',
qr_code_updated_count INT(1) NULL DEFAULT 0 COMMENT '邀请二维码更新次数',
qr_code_param TEXT NOT NULL COMMENT '邀请二维码携带从参数,可以是 JSON 字符串',
expire_time DATETIME null comment '二维码过期时间',
create_time DATETIME DEFAULT CURRENT_TIMESTAMP NULL COMMENT '创建时间',
update_time DATETIME DEFAULT CURRENT_TIMESTAMP NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
is_delete INT(1) DEFAULT 0 NULL COMMENT '是否删除: 0:未删 1:已删除 default:0'
) COMMENT '推荐入驻二维码';
CREATE INDEX idx_user_uuid ON recommended_in_qr_code (user_uuid);
CREATE INDEX idx_recommended_in_uuid ON recommended_in_qr_code (recommended_in_uuid);
create table recommended_in_record
(
uuid bigint(19) not null comment '主键 uuid'
primary key,
recommended_in_qr_code_uuid bigint(11) not null comment 'recommended_in_qr_code uuid',
recommended_in_uuid bigint(11) not null comment 'recommended_in uuid',
inviter_uuid varchar(64) null comment '邀请人 user uuid',
invitee_uuid varchar(64) null comment '受邀人 user uuid',
create_time datetime default CURRENT_TIMESTAMP null comment '创建时间',
update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '修改时间',
is_delete int(1) default 0 null comment '是否删除: 0:未删 1:已删除 default:0'
)
comment '推荐入驻记录';
create index idx_inviter_uuid
on recommended_in_record (inviter_uuid);
create index idx_recommended_in_uuid
on recommended_in_record (recommended_in_uuid);
alter table recommended_in_record
add inviter VARCHAR(64) null comment '邀请人';
alter table recommended_in_record
add invitee VARCHAR(64) null comment '受邀人';
create index recommended_in_record_invitee_uuid_index
on recommended_in_record (invitee_uuid);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment