Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
风灵Erick
Python-100-Days
提交
301bb830
P
Python-100-Days
项目概览
风灵Erick
/
Python-100-Days
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Python-100-Days
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
301bb830
编写于
3月 31, 2022
作者:
骆昊的技术专栏
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加了SQL案例
上级
b2d309c6
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
96 addition
and
0 deletion
+96
-0
Day36-40/code/app_store.sql
Day36-40/code/app_store.sql
+96
-0
未找到文件。
Day36-40/code/app_store.sql
0 → 100644
浏览文件 @
301bb830
create
table
`app_info`
(
`id`
bigint
(
20
)
not
null
auto_increment
comment
'自增id, app的id'
,
`app_name`
varchar
(
255
)
default
''
comment
'名称'
,
`icon_url`
varchar
(
255
)
default
''
comment
'icon地址'
,
`version`
varchar
(
32
)
default
''
comment
'版本号'
,
`app_size`
varchar
(
32
)
default
''
comment
'包大小'
,
`banner_info`
varchar
(
4096
)
default
''
comment
'banner信息'
,
`developer_id`
varchar
(
255
)
default
''
comment
'开发者id'
,
`summary`
varchar
(
512
)
default
''
comment
'简介'
,
`app_desc`
text
comment
'详细信息'
,
`download_url`
varchar
(
255
)
default
''
comment
'下载链接'
,
`price`
int
(
10
)
default
'0'
comment
'价格,单位:分'
,
`status`
tinyint
(
4
)
unsigned
default
'0'
comment
'状态,1:待审核,2:审核通过,3,已下线'
,
`version_desc`
varchar
(
4096
)
default
''
comment
''
,
`create_time`
datetime
not
null
default
'0000-00-00 00:00:00'
comment
'创建时间'
,
`update_time`
datetime
not
null
default
'0000-00-00 00:00:00'
comment
'更新时间'
,
primary
key
(
`id`
),
key
`idx_app_name`
(
`app_name`
),
key
`idx_developer`
(
`user_id`
)
)
engine
=
innodb
auto_increment
=
100000
default
charset
=
utf8
comment
=
'app基本信息表'
;
create
table
`app_ext_info`
(
`id`
bigint
(
20
)
not
null
auto_increment
comment
'自增id'
,
`app_id`
bigint
(
20
)
not
null
default
'0'
comment
'app_id'
,
`install_count`
bigint
(
20
)
unsigned
not
null
default
'0'
comment
'app安装量'
,
`score`
int
(
10
)
unsigned
not
null
default
'0'
comment
'评分'
,
`comment_count`
int
(
10
)
unsigned
not
null
default
'0'
comment
'评论量'
,
`create_time`
int
(
10
)
not
null
default
0
comment
'创建时间'
,
`update_time`
int
(
10
)
not
null
default
0
comment
'更新时间'
,
primary
key
(
`id`
),
unique
key
`idx_app_id`
(
`app_id`
)
)
engine
=
innodb
default
charset
=
utf8
comment
=
'App扩展信息表'
;
create
table
`app_category`
(
`id`
bigint
(
20
)
not
null
auto_increment
comment
'自增id'
,
`parent_id`
bigint
(
20
)
not
null
default
'0'
comment
'父分类id'
,
`name`
varchar
(
64
)
not
null
default
''
comment
'分类名称'
,
`icon`
varchar
(
512
)
not
null
default
''
comment
'icon地址'
,
`category_desc`
text
comment
'分类描述'
,
`category_level`
tinyint
(
4
)
unsigned
not
null
default
'0'
comment
'分类级别'
,
`status`
tinyint
(
4
)
unsigned
not
null
default
'0'
comment
'当前状态,1:使用中,隐藏'
,
`display_order`
int
(
10
)
unsigned
not
null
default
'0'
comment
'排序,值越大越靠前'
,
`create_time`
int
(
10
)
not
null
default
0
comment
'创建时间'
,
`update_time`
int
(
10
)
not
null
default
0
comment
'更新时间'
,
primary
key
(
`id`
)
)
engine
=
innodb
default
charset
=
utf8
comment
=
'分类信息表'
;
create
table
`app_category_rel`
(
`id`
bigint
(
20
)
not
null
auto_increment
comment
'自增id'
,
`app_id`
bigint
(
20
)
not
null
default
'0'
comment
'app_id'
,
`category_id`
bigint
(
20
)
unsigned
not
null
default
'0'
comment
'最低层分类id'
,
primary
key
(
`id`
),
unique
key
`idx_category_app`
(
`category_id`
,
`app_record_id`
),
key
`idx_app`
(
`app_id`
)
)
engine
=
innodb
default
charset
=
utf8
comment
=
'App和分类关联表'
;
create
table
`app_comment`
(
`id`
bigint
(
20
)
not
null
auto_increment
comment
'自增id'
,
`app_id`
bigint
(
20
)
not
null
default
'0'
comment
'app_id'
,
`title`
varchar
(
255
)
default
''
comment
'评论标题'
,
`content`
varchar
(
2048
)
default
''
comment
'评论内容'
,
`parent_id`
bigint
(
20
)
default
'0'
comment
'父评论id'
,
`commenter_uid`
bigint
(
20
)
default
'0'
comment
'评论用户id'
,
`commenter_name`
varchar
(
255
)
default
''
comment
'评论用户名称'
,
`commenter_avatar`
varchar
(
255
)
default
''
comment
'评论用户头像'
,
`top_flag`
tinyint
(
4
)
default
'0'
comment
'是否置顶'
,
`like_count`
int
(
10
)
default
'0'
comment
'评论的赞数量'
,
`status`
tinyint
(
4
)
default
'0'
comment
'评论状态'
,
`create_time`
int
(
10
)
not
null
default
0
comment
'创建时间'
,
`update_time`
int
(
10
)
not
null
default
0
comment
'更新时间'
,
primary
key
(
`id`
),
key
`idx_app_status`
(
`app_id`
,
`status`
,
`top_flag`
)
)
engine
=
innodb
default
charset
=
utf8
comment
=
'评论信息表'
;
create
table
`user_app_relation`
(
`id`
bigint
(
20
)
not
null
auto_increment
comment
'自增id'
,
`user_id`
bigint
(
20
)
unsigned
not
null
default
'0'
comment
'用户id'
,
`app_id`
bigint
(
20
)
not
null
default
'0'
comment
'app_id'
,
`create_time`
int
(
10
)
not
null
default
0
comment
'创建时间'
,
`update_time`
int
(
10
)
not
null
default
0
comment
'更新时间'
,
`is_del`
tinyint
(
4
)
not
null
default
'0'
comment
'1:删除 0:未删除'
,
primary
key
(
`id`
),
key
`idx_user_app`
(
`user_id`
,
`app_id`
)
)
engine
=
innodb
auto_increment
=
8063
default
charset
=
utf8
comment
=
'用户购买关系表'
;
create
table
`bot_score`
(
`id`
bigint
(
20
)
not
null
auto_increment
comment
'自增id'
,
`app_id`
bigint
(
20
)
not
null
default
'0'
comment
'app_id'
,
`score`
int
(
10
)
default
'0'
comment
'用户评分'
,
`commenter_uid`
bigint
(
20
)
default
'0'
comment
'评分用户id'
,
`status`
tinyint
(
4
)
default
'0'
comment
'评分状态'
,
`create_time`
int
(
10
)
not
null
default
0
comment
'创建时间'
,
`update_time`
int
(
10
)
not
null
default
0
comment
'更新时间'
,
primary
key
(
`id`
),
unique
key
`idx_uid_score`
(
`app_id`
,
`commenter_uid`
)
)
engine
=
innodb
default
charset
=
utf8
comment
=
'App评分表'
;
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录