记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
293a3d30
Commit
293a3d30
authored
May 10, 2021
by
张国柄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init sql;
parent
b7f50299
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
112 additions
and
104 deletions
+112
-104
db_ln_adam_initialdata.sql
...quidnet-service-adam-impl/docu/db_ln_adam_initialdata.sql
+112
-104
No files found.
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/docu/db_ln_adam_initialdata.sql
View file @
293a3d30
...
...
@@ -5,46 +5,51 @@ use ln_adam;
drop
table
if
exists
adam_third_party
;
create
table
adam_third_party
(
mid
int
unsigned
auto_increment
primary
key
,
uid
varchar
(
64
)
default
''
,
open_id
varchar
(
64
)
comment
'第三方ID'
,
avatar
varchar
(
255
)
comment
'第三方头像'
,
nickname
varchar
(
64
)
comment
'第三方昵称'
,
platform
varchar
(
20
)
comment
'平台名称'
,
state
tinyint
comment
'0-INIT,1-NORMAL,2-INVALID'
,
created_at
datetime
,
updated_at
datetime
mid
int
unsigned
auto_increment
primary
key
,
third_party_id
varchar
(
64
)
not
null
,
uid
varchar
(
64
)
default
''
,
open_id
varchar
(
64
)
comment
'第三方ID'
,
avatar
varchar
(
255
)
comment
'第三方头像'
,
nick_name
varchar
(
64
)
comment
'第三方昵称'
,
platform
varchar
(
20
)
comment
'平台名称'
,
state
tinyint
comment
'0-INIT,1-NORMAL,2-INVALID'
,
created_at
datetime
,
updated_at
datetime
)
engine
=
InnoDB
comment
'用户第三方账号信息'
;
create
index
idx_adam_third_party_open_id
on
adam_third_party
(
uid
);
create
unique
index
uidx_third_party_id
on
adam_third_party
(
third_party_id
);
create
index
idx_third_party_open_id
on
adam_third_party
(
uid
);
-- >>------------------------------------------------------------------------------------
drop
table
if
exists
adam_login
;
create
table
adam_login
(
mid
int
unsigned
auto_increment
primary
key
,
mobile
varchar
(
16
),
platform
varchar
(
20
)
comment
'平台名称'
,
entrance
varchar
(
20
)
comment
'入口标记:Wechat、H5、App'
,
source
varchar
(
20
)
comment
'来源终端'
,
version
varchar
(
20
)
comment
'终端版本'
,
client_ip
varchar
(
20
),
client_area
varchar
(
30
),
created_at
datetime
)
engine
=
InnoDB
comment
'登录记录'
;
create
index
idx_adam
_login_mobile
on
adam_login
(
mobile
);
#
drop
table
if
exists
adam_login
;
#
create
table
adam_login
#
(
#
mid
int
unsigned
auto_increment
primary
key
,
#
mobile
varchar
(
16
),
#
platform
varchar
(
20
)
comment
'平台名称'
,
#
entrance
varchar
(
20
)
comment
'入口标记:Wechat、H5、App'
,
#
source
varchar
(
20
)
comment
'来源终端'
,
#
version
varchar
(
20
)
comment
'终端版本'
,
#
client_ip
varchar
(
20
),
#
client_area
varchar
(
30
),
#
created_at
datetime
#
)
engine
=
InnoDB
comment
'登录记录'
;
#
create
index
idx
_login_mobile
on
adam_login
(
mobile
);
-- >>------------------------------------------------------------------------------------
drop
table
if
exists
adam_device_tokens
;
create
table
adam_device_token
(
mid
int
unsigned
auto_increment
primary
key
,
uid
varchar
(
64
)
not
null
,
#
user_id
varchar
(
255
)
null
,
android
varchar
(
255
)
null
,
ios
varchar
(
255
)
null
,
ipad
varchar
(
255
)
null
,
is_last
tinyint
,
created_at
datetime
not
null
,
updated_at
datetime
mid
int
unsigned
auto_increment
primary
key
,
device_tokens_id
varchar
(
64
)
not
null
,
uid
varchar
(
64
)
not
null
,
android
varchar
(
255
)
null
,
ios
varchar
(
255
)
null
,
ipad
varchar
(
255
)
null
,
is_last
tinyint
,
created_at
datetime
not
null
,
updated_at
datetime
)
engine
=
InnoDB
comment
'TOKEN'
;
create
unique
index
uidx_device_token_id
on
adam_device_token
(
device_tokens_id
);
-- >>------------------------------------------------------------------------------------
drop
table
if
exists
adam_user
;
create
table
adam_user
...
...
@@ -61,10 +66,11 @@ create table adam_user
is_real
tinyint
comment
'是否实名:0-NO,1-YES'
,
vip_level
tinyint
comment
'会员标识/级别'
)
ENGINE
=
InnoDB
comment
'用户'
;
create
unique
index
uidx_adam_user_uid
on
adam_user
(
uid
);
create
unique
index
uidx_user_uid
on
adam_user
(
uid
);
-- >>------------------------------------------------------------------------------------
drop
table
if
exists
adam_user_info
_zz
;
create
table
adam_user_info
_zz
drop
table
if
exists
adam_user_info
;
create
table
adam_user_info
(
mid
int
unsigned
auto_increment
primary
key
,
uid
varchar
(
64
)
not
null
,
...
...
@@ -77,24 +83,26 @@ create table adam_user_info_zz
background
varchar
(
255
)
comment
'背景图'
,
qr_code
varchar
(
255
)
comment
'身份二维码'
,
qr_pic
varchar
(
255
)
comment
'身份二维码'
,
tag_m
usic
varchar
(
500
)
comment
'音乐标签'
tag_m
e
varchar
(
500
)
comment
'音乐标签'
)
engine
=
InnoDB
comment
'正在现场用户信息'
;
create
unique
index
idx_
adam_user_info_zz_uid
on
adam_user_info_zz
(
uid
);
create
unique
index
idx_
user_info_zz_uid
on
adam_user_info
(
uid
);
-- >>------------------------------------------------------------------------------------
drop
table
if
exists
adam_real_name
;
create
table
adam_real_name
(
mid
int
unsigned
auto_increment
primary
key
,
uid
varchar
(
64
)
not
null
,
type
enum
(
'1'
,
'2'
,
'3'
,
'4'
,
'5'
)
not
null
default
'1'
comment
'1大陆身份证 2港澳通行证 3台胞证 4护照 5军官证'
,
name
varchar
(
20
)
not
null
comment
'真实姓名'
,
id_card
varchar
(
30
)
not
null
comment
'证件号码'
,
state
tinyint
not
null
comment
'0-INIT,1-NORMAL,2-INVALID'
,
created_at
datetime
not
null
,
updated_at
datetime
,
comment
text
mid
int
unsigned
auto_increment
primary
key
,
real_name_id
varchar
(
64
)
not
null
,
uid
varchar
(
64
)
not
null
,
type
enum
(
'1'
,
'2'
,
'3'
,
'4'
,
'5'
)
not
null
default
'1'
comment
'1大陆身份证 2港澳通行证 3台胞证 4护照 5军官证'
,
name
varchar
(
20
)
not
null
comment
'真实姓名'
,
id_card
varchar
(
30
)
not
null
comment
'证件号码'
,
state
tinyint
not
null
comment
'0-INIT,1-NORMAL,2-INVALID'
,
created_at
datetime
not
null
,
updated_at
datetime
,
comment
text
)
engine
=
InnoDB
comment
'实名信息'
;
create
unique
index
idx_adam_real_name_uid
on
adam_real_name
(
uid
);
create
unique
index
idx_real_name_uid
on
adam_real_name
(
uid
);
-- >>------------------------------------------------------------------------------------
drop
table
if
exists
adam_enters
;
create
table
adam_enters
...
...
@@ -116,15 +124,13 @@ create table adam_enters
comment
text
)
engine
=
InnoDB
comment
=
'入场人'
;
create
unique
index
uidx_
adam_
enters_id
on
adam_enters
(
enters_id
);
create
index
idx_
adam_
enters_uid
on
adam_enters
(
uid
);
create
unique
index
uidx_enters_id
on
adam_enters
(
enters_id
);
create
index
idx_enters_uid
on
adam_enters
(
uid
);
-- >>------------------------------------------------------------------------------------
drop
table
if
exists
adam_addresses
;
create
table
adam_addresses
(
mid
int
unsigned
auto_increment
not
null
primary
key
,
#
`user_id`
int
(
11
)
NOT
NULL
DEFAULT
'0'
COMMENT
'用户id关联'
,
#
`string_id`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_unicode_ci
NOT
NULL
COMMENT
'用户StringID'
,
addresses_id
varchar
(
64
)
not
null
,
uid
varchar
(
64
)
not
null
,
name
varchar
(
255
)
not
null
comment
'姓名'
,
...
...
@@ -140,33 +146,34 @@ create table adam_addresses
comment
text
)
engine
=
InnoDB
comment
'收货地址'
;
create
unique
index
uidx_ad
am_ad
dresses_id
on
adam_addresses
(
addresses_id
);
create
index
idx_ad
am_ad
dresses_uid
on
adam_addresses
(
uid
);
create
unique
index
uidx_addresses_id
on
adam_addresses
(
addresses_id
);
create
index
idx_addresses_uid
on
adam_addresses
(
uid
);
-- >>------------------------------------------------------------------------------------
drop
table
if
exists
adam_feedback
;
create
table
adam_feedback
(
mid
int
unsigned
auto_increment
not
null
primary
key
,
uid
varchar
(
64
)
not
null
,
type
enum
(
'complaints'
,
'bug'
,
'order'
,
'video'
,
'other'
)
not
null
comment
'反馈类型'
,
comment
varchar
(
255
)
not
null
comment
'反馈内容'
,
reply_comment
varchar
(
255
)
null
comment
'回复内容'
,
source
varchar
(
255
)
not
null
comment
'来源终端'
,
version
varchar
(
255
)
not
null
comment
'终端版本'
,
model
varchar
(
255
)
default
''
not
null
comment
'设备'
,
status
enum
(
'notreply'
,
'replied'
,
'processed'
)
default
'notreply'
not
null
comment
'状态'
,
mobile
varchar
(
50
)
not
null
comment
'手机号'
,
admin_id
int
default
0
not
null
comment
'处理人'
,
admin_name
varchar
(
255
)
default
''
not
null
comment
'处理人姓名'
,
admin_time
datetime
null
comment
'处理时间'
,
created_at
datetime
not
null
,
updated_at
datetime
)
engine
=
InnoDB
comment
'反馈'
;
#
drop
table
if
exists
adam_feedback
;
#
create
table
adam_feedback
#
(
#
mid
int
unsigned
auto_increment
not
null
primary
key
,
#
uid
varchar
(
64
)
not
null
,
#
type
enum
(
'complaints'
,
'bug'
,
'order'
,
'video'
,
'other'
)
not
null
comment
'反馈类型'
,
#
comment
varchar
(
255
)
not
null
comment
'反馈内容'
,
#
reply_comment
varchar
(
255
)
null
comment
'回复内容'
,
#
source
varchar
(
255
)
not
null
comment
'来源终端'
,
#
version
varchar
(
255
)
not
null
comment
'终端版本'
,
#
model
varchar
(
255
)
default
''
not
null
comment
'设备'
,
#
status
enum
(
'notreply'
,
'replied'
,
'processed'
)
default
'notreply'
not
null
comment
'状态'
,
#
mobile
varchar
(
50
)
not
null
comment
'手机号'
,
#
admin_id
int
default
0
not
null
comment
'处理人'
,
#
admin_name
varchar
(
255
)
default
''
not
null
comment
'处理人姓名'
,
#
admin_time
datetime
null
comment
'处理时间'
,
#
created_at
datetime
not
null
,
#
updated_at
datetime
#
)
engine
=
InnoDB
comment
'反馈'
;
-- >>------------------------------------------------------------------------------------
drop
table
if
exists
adam_collection
;
create
table
adam_collection
(
mid
int
unsigned
auto_increment
primary
key
,
collection_id
varchar
(
64
)
not
null
,
uid
varchar
(
64
)
not
null
,
duration
bigint
default
0
null
,
content_id
int
unsigned
,
...
...
@@ -177,7 +184,8 @@ create table adam_collection
created_at
datetime
not
null
,
updated_at
datetime
)
engine
=
InnoDB
comment
'收藏'
;
create
index
idx_adam_collection_uid
on
adam_collection
(
uid
);
create
index
idx_collection_uid
on
adam_collection
(
uid
);
-- >>------------------------------------------------------------------------------------
drop
table
if
exists
adam_disposed
;
create
table
adam_disposed
...
...
@@ -194,49 +202,49 @@ create table adam_disposed
created_at
datetime
not
null
,
updated_at
datetime
)
engine
=
InnoDB
comment
'想去'
;
create
index
idx_
adam_
disposed_uid
on
adam_disposed
(
uid
);
create
index
idx_
adam_
disposed_content
on
adam_disposed
(
content_id
);
create
index
idx_disposed_uid
on
adam_disposed
(
uid
);
create
index
idx_disposed_content
on
adam_disposed
(
content_id
);
-- >>------------------------------------------------------------------------------------
drop
table
if
exists
adam_member
;
create
table
adam_member
(
mid
int
unsigned
auto_increment
primary
key
,
member_id
varchar
(
255
)
comment
'会员id'
,
name
varchar
(
64
),
title
varchar
(
100
),
sub_title
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'副标题'
,
icon
varchar
(
255
),
avatar
varchar
(
255
),
start_no
varchar
(
20
)
comment
'起始会员号'
,
type
tinyint
comment
'会员类型'
,
interests_detail
text
comment
'权益详情'
,
mid
int
unsigned
auto_increment
primary
key
,
member_id
varchar
(
255
)
comment
'会员id'
,
name
varchar
(
64
),
title
varchar
(
100
),
sub_title
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'副标题'
,
icon
varchar
(
255
),
avatar
varchar
(
255
),
start_no
varchar
(
20
)
comment
'起始会员号'
,
type
tinyint
comment
'会员类型'
,
interests_detail
text
comment
'权益详情'
,
#
gift_pack_id
varchar
(
64
)
comment
'礼包ID'
,
notes
text
NOT
NULL
COMMENT
'注意事项'
,
created_at
datetime
,
updated_at
datetime
,
is_notice
tinyint
comment
'是否展示须知'
,
notice_info
text
comment
'须知内容'
,
notice_title
varchar
(
255
),
need_question
int
default
0
comment
'是否需要答题 0不需要 1需要'
,
display_agreement
int
NOT
NULL
DEFAULT
'0'
COMMENT
'是否打开0否1是'
,
agreement
text
NOT
NULL
COMMENT
'会员协议'
notes
text
NOT
NULL
COMMENT
'注意事项'
,
created_at
datetime
,
updated_at
datetime
,
is_notice
tinyint
comment
'是否展示须知'
,
notice_info
text
comment
'须知内容'
,
notice_title
varchar
(
255
),
need_question
int
default
0
comment
'是否需要答题 0不需要 1需要'
,
display_agreement
int
NOT
NULL
DEFAULT
'0'
COMMENT
'是否打开0否1是'
,
agreement
text
NOT
NULL
COMMENT
'会员协议'
);
-- >>------------------------------------------------------------------------------------
drop
table
if
exists
adam_member_price
;
create
table
adam_member_price
(
mid
int
u
sin
gned
auto_increment
primary
key
,
member_price_id
varchar
(
255
)
comment
'会员价格id'
,
member_id
int
NOT
NULL
COMMENT
'会员种类ID'
,
status
tinyint
NOT
NULL
DEFAULT
'0'
COMMENT
'0不可用、1上线中、2已下线'
,
mid
int
u
nsi
gned
auto_increment
primary
key
,
member_price_id
varchar
(
255
)
comment
'会员价格id'
,
member_id
int
NOT
NULL
COMMENT
'会员种类ID'
,
status
tinyint
NOT
NULL
DEFAULT
'0'
COMMENT
'0不可用、1上线中、2已下线'
,
name
varchar
(
64
)
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_unicode_ci
NOT
NULL
DEFAULT
''
COMMENT
'会员包名称'
,
price
decimal
(
8
,
2
)
NOT
NULL
DEFAULT
'0.00'
COMMENT
'会员包价格'
,
price_fixed
decimal
(
8
,
2
)
comment
'折扣价'
,
days
int
NOT
NULL
DEFAULT
'0'
COMMENT
'会员包天数'
,
detail
text
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_unicode_ci
NOT
NULL
COMMENT
'会员包须知'
,
price
decimal
(
8
,
2
)
NOT
NULL
DEFAULT
'0.00'
COMMENT
'会员包价格'
,
price_fixed
decimal
(
8
,
2
)
comment
'折扣价'
,
days
int
NOT
NULL
DEFAULT
'0'
COMMENT
'会员包天数'
,
detail
text
CHARACTER
SET
utf8mb4
COLLATE
utf8mb4_unicode_ci
NOT
NULL
COMMENT
'会员包须知'
,
created_at
datetime
,
updated_at
datetime
)
)
;
-- >>------------------------------------------------------------------------------------
drop
table
if
exists
adam_member_order
;
create
table
adam_member_order
...
...
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