Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dankal-data-view
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
仲光辉
dankal-data-view
Commits
3bd5c913
Commit
3bd5c913
authored
Jun 27, 2024
by
mercymodest
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:- add yoga sql
parent
78c28152
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
2 deletions
+52
-2
线上需要同步的SQL.sql
拉伽/线上需要同步的SQL.sql
+52
-2
No files found.
拉伽/线上需要同步的SQL.sql
View file @
3bd5c913
#
CRE
ATE
TABLE
`api_client_credentials`
#
CRE
ATE
TABLE
`api_client_credentials`
...
...
@@ -213,8 +213,58 @@ CREATE TABLE user_card_audit_log
update_time
datetime
default
CURRENT_TIMESTAMP
null
on
update
CURRENT_TIMESTAMP
COMMENT
'更新时间'
)
COMMENT
=
'会员卡审核记录表'
;
alter
table
user_card
add
audit_status
tinyint
(
1
)
default
1
null
comment
'会员卡审核状态:0:待审核 1:审核通过 2:审核驳回 default:1'
;
add
audit_status
tinyint
(
1
)
default
1
null
comment
'审核状态枚举: 0:待审核,1:审核通过,2:审核驳回 3:已撤销 default:1'
;
alter
table
user_card_audit_log
modify
step
tinyint
not
null
comment
' 审核步骤: 0:待审核,1:已撤销 2:审核通过,3:审核拒绝。'
;
alter
table
user_card
add
audit_record_id
BIGINT
null
comment
'当前审核记录ID'
;
create
index
user_card_audit_log_record_id_index
on
user_card_audit_log
(
record_id
);
alter
table
user_card_change_logs
modify
operation_type
tinyint
(
1
)
default
1
null
comment
'卡操作类型,1:发卡,2;开卡,3:请假,4:退卡,5:补卡,6:挂失,7:续卡,8:转卡,9:解挂,10:停卡,11:解除停卡,12:卡升级 13:(会员卡)待审核,14:(会员卡)审核通过,15:(会员卡)审核驳回 16:(会员卡)已撤销'
;
alter
table
user_card_change_logs
add
record_id
BIGINT
null
comment
'会员卡记录ID,同一条审核记录ID相同。'
;
alter
table
user_card_change_logs
add
step
tinyint
null
comment
'会员卡审核步骤: 0:待审核,1:已撤销 2:审核通过,3:审核拒绝。'
;
alter
table
user_card_change_logs
add
remarks
varchar
(
200
)
null
comment
'会员卡审核备注'
;
-- 使用雪花算法生成的主键
CREATE
TABLE
user_management_records
(
member_management_records_id
BIGINT
PRIMARY
KEY
COMMENT
'主键ID'
,
`year`
INT
NOT
NULL
COMMENT
'年'
,
`month`
TINYINT
NOT
NULL
COMMENT
'月'
,
year_month_str
VARCHAR
(
7
)
NOT
NULL
COMMENT
'年月'
,
reservation_count
INT
NOT
NULL
COMMENT
'预约次数'
,
checkin_count
INT
NOT
NULL
COMMENT
'签到次数'
,
weight
DECIMAL
(
5
,
2
)
NOT
NULL
COMMENT
'体重(kg)'
,
notes
text
COMMENT
'备注'
,
create_time
DATETIME
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
update_time
DATETIME
NULL
COMMENT
'最新编辑时间'
,
user_uuid
BIGINT
NOT
NULL
COMMENT
'用户UUID'
)
COMMENT
=
'用户管理记录表'
;
create
index
user_management_records_month_index
on
user_management_records
(
month
);
create
index
user_management_records_user_uuid_index
on
user_management_records
(
user_uuid
);
create
index
user_management_records_year_index
on
user_management_records
(
year
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment