Ver código fonte

course and support version 1.0 db structure

huodongdong 7 anos atrás
pai
commit
cc6b1be0e7

+ 21 - 3
db/lj_course.md

@@ -1,4 +1,22 @@
-####
+### lj_course table structure
+> 此表为课程存储对应的数据结构
 
-|字段 |类型|是否为空 |默认值|描述|
-|---- |:---|:---|:---|:----:|
+
+| field | type | null | default | desc | extra |
+|----|:-----|:-------|:------|:-----|:-----|
+| id | bigint | no | | 主键 | pri |
+| cid | varchar(512) | no | | 课程编码 | uni |
+| name | varchar(1024) | yes | null | 课程名 | |
+| title | varchar(1024) | yes | null | 课程标题 | |
+| type | smallint | no | 0 | 课程类型 | |
+| digest | text | yes | null | 课程摘要 | |
+| detail | text | yes | null | 课程简介 | |
+| keyword | varchar(1024) | yes | null | 课程关键字 | |
+| cv_img_id | varchar(512) | yes | null | 封面图 | |
+| bg_img_id | varchar(512) | yes | null | 背景图 | |
+| status | smallint | no | | 状态 | |
+| create_time | smallint | no | now | 创建时间 | |
+| update_time | timestamp | no | now | 更新时间 | | |
+
+##### index
+> unique index cid

+ 15 - 0
db/lj_course_support_relation.md

@@ -0,0 +1,15 @@
+### lj_course_support_relation table structure
+> 此表为课程与周边的对应关系的数据结构
+
+
+| field | type | null | default | desc | extra |
+|----|:-----|:-------|:------|:-----|:-----|
+| id | bigint | no | | 主键 | pri |
+| cid | varchar(512) | no | | 课程编码 | |
+| sid | varchar(512) | no | | 周边编码 | |
+| merchant_id | bigint | no | | 渠道id | |
+| status | smallint | no | | 状态 | |
+| create_time | smallint | no | now | 创建时间 | | |
+
+##### index
+> unique index on(cid, sid, merchant_id)

+ 15 - 0
db/lj_course_unit_relation.md

@@ -0,0 +1,15 @@
+### lj_course_unit_relation table structure
+> 此表为课程与单元的对应关系的数据结构
+
+
+| field | type | null | default | desc | extra |
+|----|:-----|:-------|:------|:-----|:-----|
+| id | bigint | no | | 主键 | pri |
+| cid | varchar(512) | no | | 课程编码 | |
+| uid | varchar(512) | no | | 单元编码 | |
+| merchant_id | bigint | no | | 渠道id | |
+| status | smallint | no | | 状态 | |
+| create_time | smallint | no | now | 创建时间 | | |
+
+##### index
+> unique index on(cid, uid, merchant_id)

+ 16 - 0
db/lj_lesson.md

@@ -0,0 +1,16 @@
+### lj_lesson table structure
+> 此表为课存储对应的数据结构
+
+
+| field | type | null | default | desc | extra |
+|----|:-----|:-------|:------|:-----|:-----|
+| id | bigint | no | | 主键 | pri |
+| lid | varchar(512) | no | | 课编码 | uni |
+| title | varchar(1024) | yes | null | 标题 | |
+| digest | text | yes | null | 课摘要 | |
+| status | smallint | no | | 状态 | |
+| create_time | smallint | no | now | 创建时间 | |
+| update_time | timestamp | no | now | 更新时间 | |
+
+##### index
+> unique index lid

+ 15 - 0
db/lj_lesson_ware_relation.md

@@ -0,0 +1,15 @@
+### lj_lesson_ware_relation table structure
+> 此表为课与课件的对应关系的数据结构
+
+
+| field | type | null | default | desc | extra |
+|----|:-----|:-------|:------|:-----|:-----|
+| id | bigint | no | | 主键 | pri |
+| lid | varchar(512) | no | | 课编码 | |
+| wid | varchar(512) | no | | 课件编码 | |
+| merchant_id | bigint | no | | 渠道id | |
+| status | smallint | no | | 状态 | |
+| create_time | smallint | no | now | 创建时间 | | |
+
+##### index
+> unique index on(lid, wid, merchant_id)

+ 20 - 0
db/lj_support.md

@@ -0,0 +1,20 @@
+### lj_support table structure
+> 此表为课程存储对应的数据结构
+
+
+| field | type | null | default | desc | extra |
+|----|:-----|:-------|:------|:-----|:-----|
+| id | bigint | no | | 主键 | pri |
+| sid | varchar(512) | no | | 周边编码 | uni |
+| name | varchar(1024) | yes | null | 名 | |
+| title | varchar(1024) | yes | null | 标题 | |
+| type | smallint | no | 0 | 类型 | |
+| digest | text | yes | null | 摘要 | |
+| detail | text | yes | null | 简介 | |
+| img_ids | varchar(512) | yes | null | 封面图 | |
+| status | smallint | no | | 状态 | |
+| create_time | smallint | no | now | 创建时间 | |
+| update_time | timestamp | no | now | 更新时间 | | |
+
+##### index
+> unique index sid

+ 16 - 0
db/lj_unit.md

@@ -0,0 +1,16 @@
+### lj_unit table structure
+> 此表为课存储对应的数据结构
+
+
+| field | type | null | default | desc | extra |
+|----|:-----|:-------|:------|:-----|:-----|
+| id | bigint | no | | 主键 | pri |
+| uid | varchar(512) | no | | 单元编码 | uni |
+| title | varchar(1024) | yes | null | 单元标题 | |
+| digest | text | yes | null | 单元摘要 | |
+| status | smallint | no | | 状态 | |
+| create_time | smallint | no | now | 创建时间 | |
+| update_time | timestamp | no | now | 更新时间 | | |
+
+##### index
+> unique index uid

+ 15 - 0
db/lj_unit_lesson_relation.md

@@ -0,0 +1,15 @@
+### lj_unit_lesson_relation table structure
+> 此表为单元与课的对应关系的数据结构
+
+
+| field | type | null | default | desc | extra |
+|----|:-----|:-------|:------|:-----|:-----|
+| id | bigint | no | | 主键 | pri |
+| uid | varchar(512) | no | | 单元编码 | |
+| lid | varchar(512) | no | | 课程编码 | |
+| merchant_id | bigint | no | | 渠道id | |
+| status | smallint | no | | 状态 | |
+| create_time | smallint | no | now | 创建时间 | | |
+
+##### index
+> unique index on(uid, lid, merchant_id)

+ 17 - 0
db/lj_ware.md

@@ -0,0 +1,17 @@
+### lj_ware table structure
+> 此表为课程存储对应的数据结构
+
+
+| field | type | null | default | desc | extra |
+|----|:-----|:-------|:------|:-----|:-----|
+| id | bigint | no | | 主键 | pri |
+| wid | varchar(512) | no | | 课件编码 | uni |
+| title | varchar(1024) | yes | null | 课件标题 | |
+| digest | text | yes | null | 课件摘要 | |
+| type | smallint | no | | 类型 | |
+| status | smallint | no | | 状态 | |
+| create_time | smallint | no | now | 创建时间 | |
+| update_time | timestamp | no | now | 更新时间 | | |
+
+##### index
+> unique index wid