Browse Source

rename and add resource

huodongdong 7 years ago
parent
commit
210193d535

+ 2 - 0
api/cms/resource/resource_list.md

@@ -24,6 +24,7 @@
 | name | string | 名称 |
 | digest| string | 描述 |
 | tags | array | 标签名数组 |
+| url | string | 地址 |
 | cpId| int | 内容提供商id |
 | cpName| string | 内容提供商名字 |
 | state| int| 状态 |
@@ -56,6 +57,7 @@
           "动漫",
           "幼儿启蒙"
           ],
+        "url": "xxx",
         "cpId": 123,
         "state": 0,
         "gmtCreated": "创建时间",

+ 2 - 0
api/cms/resource/resource_one.md

@@ -17,6 +17,7 @@
 | name | string | 名称 |
 | digest| string | 描述 |
 | tags | array | 标签名数组 |
+| url | string | 地址 |
 | cpId| int | 内容提供商id |
 | cpName| string | 内容提供商名字 |
 | state| int| 状态 |
@@ -38,6 +39,7 @@
       {22:'b'},
       {23:'c'}
       ],
+    "url": "xxx",
     "cpId": 123,
     "cpName": "鲨鱼公园",
     "state": 0,

+ 2 - 1
api/cms/resource/resource_save.md

@@ -7,10 +7,11 @@
 | name | type | null| desc |
 |------|:-----|:----|:----:|
 | id | int | yes | id |
-| code | string | no | 编码 |
+| code | string | yes | 编码 |
 | name | string | no | 名称 |
 | digest| string | yes | 描述 |
 | tags | array | yes | 标签名数组 |
+| url | string | no | 地址 |
 | cpId| int | yes | 内容提供商id |
 | state| int| yes | 状态|
 

+ 4 - 4
db/action/lj_event_log.md

@@ -12,8 +12,8 @@
 | tar_id | varchar(512) | yes | null | 目标id | |
 | value | bigint | no | 0 | 行为值 | |
 | platform | smallint | yes | null | | |
-| create_time | timestamp | no | now | 创建时间 | |
-| update_time | timestamp | no | create_time | 修改时间 | | |
+| gmt_created | timestamp | no | now | 创建时间 | |
+| gmt_modified | timestamp | no | gmt_created | 修改时间 | | |
 
 ##### index
 
@@ -28,8 +28,8 @@ CREATE TABLE `lj_event_log` (
   `tar_id` varchar(512) DEFAULT NULL COMMENT '目标id',
   `value` bigint(20) DEFAULT 0 COMMENT '事件值',
   `platform` smallint(6) DEFAULT NULL COMMENT '播放平台 TV APP ...',
-  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
-  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
+  `gmt_created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
+  `gmt_modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
   PRIMARY KEY (`id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
 ```

+ 3 - 5
db/product/lj_combo.md

@@ -9,13 +9,11 @@
 | name | varchar(1024) | yes | null | 课程名 | |
 | digest | text | yes | null | 课程摘要 | |
 | cv_img_ids | varchar(512) | yes | null | 封面图 | |
-| sale_price | double(16,2) | no | 0 | 渠道价格 | |
-| market_price | double(16,2) | no | 0 | 终端价格 | |
-| discount_price | double(16,2) | no| 0 | 折扣价 | |
+| dis_price | double(16,2) | no| 0 | 折扣价 | |
 | sort | int | no | 0 | 排序字段 | |
 | status | smallint | no | | 状态 | |
-| create_time | smallint | no | now | 创建时间 | |
-| update_time | timestamp | no | now | 更新时间 | | |
+| gmt_created | smallint | no | now | 创建时间 | |
+| gmt_modified | timestamp | no | now | 更新时间 | | |
 
 ##### index
 > index merchant_id

+ 3 - 3
db/product/lj_combo_item_relation.md

@@ -7,9 +7,9 @@
 | id | bigint | no | | 主键 | pri |
 | combo_id | bigint | no | | | |
 | item_id | bigint | no | | | |
-| type | smallint | no | | 出售价格类型 | |
-| price | double(16,2) | no | 0 | 课程在包内价格 | |
-| create_time | timestamp | no | now | 创建时间 | | |
+| price_id | bigint | no | | 价格 | |
+| dis_price | double(16,2) | null | | 打进课程包的价格 | |
+| gmt_created | timestamp | no | now | 创建时间 | | |
 
 ##### index
 > unique index (combo_id, item_id)

+ 2 - 2
db/product/lj_course.md

@@ -15,8 +15,8 @@
 | 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 | 更新时间 | | |
+| gmt_created | smallint | no | now | 创建时间 | |
+| gmt_modified | timestamp | no | now | 更新时间 | | |
 
 ##### index
 > unique index c_code

+ 1 - 1
db/product/lj_course_sub_relation.md

@@ -8,7 +8,7 @@
 | c_code | varchar(512) | no | | 课程编码 | |
 | t_code | varchar(512) | no | | 单元编码 | |
 | type | smallint | no | 0 | 类型, 0为课程与课对应关系, 1为课程与单元对应关系 | |
-| create_time | smallint | no | now | 创建时间 | | |
+| gmt_created | smallint | no | now | 创建时间 | | |
 
 ##### index
 > unique index on(c_code, t_code)

+ 1 - 1
db/product/lj_course_support_relation.md

@@ -7,7 +7,7 @@
 | id | bigint | no | | 主键 | pri |
 | c_code | varchar(512) | no | | 课程编码 | |
 | s_code | varchar(512) | no | | 周边编码 | |
-| create_time | smallint | no | now | 创建时间 | | |
+| gmt_created | smallint | no | now | 创建时间 | | |
 
 ##### index
 > unique index on(c_code, s_code)

+ 1 - 1
db/product/lj_course_tag_relation.md

@@ -7,7 +7,7 @@
 | id | bigint | no | | 主键 | pri |
 | tag_code |varchar(512) | no | | 标签编码 | |
 | c_code | varchar(512) | no | | 课程或周边编码 | |
-| create_time | timestamp | no | now | 创建时间 | | |
+| gmt_created | timestamp | no | now | 创建时间 | | |
 
 ##### index
 > unique index (tag_code, c_code)

+ 2 - 4
db/product/lj_item.md

@@ -8,12 +8,10 @@
 | code | varchar(512) | no | | 课程编码/周边编码 | |
 | type | smallint | no | | 商品类型, 课程/周边 | |
 | merchant_id | bigint | no | | 渠道id | |
-| cost_price | double(16,2) | no | 0 | 成本价 | |
-| sale_price | double(16,2) | no | 0 | 渠道价格 | |
 | sort | int | no | 0 | 排序字段 | |
 | status | smallint | no | | 状态 | |
-| create_time | smallint | no | now | 创建时间 | |
-| update_time | timestamp | no | now | 更新时间 | | |
+| gmt_created | smallint | no | now | 创建时间 | |
+| gmt_modified | timestamp | no | now | 更新时间 | | |
 
 ##### index
 > unique index (code, merchant_id)

+ 11 - 7
db/product/lj_item_price.md

@@ -3,14 +3,18 @@
 
 
 | field | type | null | default | desc | extra |
-|----|:-----|:-------|:------|:-----|:-----|
+|:----:|:-----|:-------|:------|:-----|:-----|
 | id | bigint | no | | 主键 | pri |
 | item_id | bigint | no | | 商品id |  |
-| price_id | int | no | | 价格类型 | |
-| price | double(16,2) | no | 0 | 价格 | |
+| type | int | no | 0 | 价格类型, 0:售卖价, 2: 课程包价 | |
+| duration | int | no | | 售卖时长 | |
+| name | varchar(512) | no | | 价格名字 | |
+| cp_price | double(16,2) | no | 0 | 内容提供商成本价 | |
+| mr_price | double(16,2) | no | 0 | 给渠道价格 | |
+| tr_price | double(16,2) | no | 0 | 终端显示价格 | |
 | status | smallint | no | | 状态 | |
-| create_time | smallint | no | now | 创建时间 | |
-| update_time | timestamp | no | now | 更新时间 | | |
+| gmt_created | smallint | no | now | 创建时间 | |
+| gmt_modified | timestamp | no | now | 更新时间 | | |
 
-##### index
-> index unique on(item_id, type)
+### index
+index on(item_id)

+ 2 - 2
db/product/lj_lesson.md

@@ -10,8 +10,8 @@
 | digest | text | yes | null | 课摘要 | |
 | sort | int | no |  | tag排序 | |
 | status | smallint | no | | 状态 | |
-| create_time | smallint | no | now | 创建时间 | |
-| update_time | timestamp | no | now | 更新时间 | |
+| gmt_created | smallint | no | now | 创建时间 | |
+| gmt_modified | timestamp | no | now | 更新时间 | |
 
 ##### index
 > unique index l_code

+ 1 - 1
db/product/lj_lesson_ware_relation.md

@@ -7,7 +7,7 @@
 | id | bigint | no | | 主键 | pri |
 | l_code | varchar(512) | no | | 课编码 | |
 | w_code | varchar(512) | no | | 课件编码 | |
-| create_time | timestamp | no | now | 创建时间 | | |
+| gmt_created | timestamp | no | now | 创建时间 | | |
 
 ##### index
 > unique index on(l_code, w_code)

+ 0 - 16
db/product/lj_price.md

@@ -1,16 +0,0 @@
-### lj_price table structure
-> 此表为出售价格的类型
-
-
-| field | type | null | default | desc | extra |
-|----|:-----|:-------|:------|:-----|:-----|
-| id | bigint | no | | 主键 | pri |
-| type | smallint | no | | 类型 | |
-| name | varchar(256) | no | | 名字 | |
-| duration | int | no | | 有效期, 单位: day | |
-| status | smallint | no | | 状态 | |
-| create_time | timestamp | no | now | 创建时间 | |
-| update_time | timestamp | no | now | 更新时间 | | |
-
-##### index
-> unique index (type, duration)

+ 2 - 2
db/product/lj_support.md

@@ -13,8 +13,8 @@
 | detail | text | yes | null | 简介 | |
 | img_ids | varchar(512) | yes | null | 封面图 | |
 | status | smallint | no | | 状态 | |
-| create_time | smallint | no | now | 创建时间 | |
-| update_time | timestamp | no | now | 更新时间 | | |
+| gmt_created | smallint | no | now | 创建时间 | |
+| gmt_modified | timestamp | no | now | 更新时间 | | |
 
 ##### index
 > unique index s_code

+ 1 - 1
db/product/lj_support_circle_relation.md

@@ -7,7 +7,7 @@
 | id | bigint | no | | 主键 | pri |
 | f_code | varchar(512) | no | | 课程编码 | |
 | t_code | varchar(512) | no | | 课程编码 | |
-| create_time | smallint | no | now | 创建时间 | | |
+| gmt_created | smallint | no | now | 创建时间 | | |
 
 ##### index
 > unique index on(f_code, t_code)

+ 2 - 2
db/product/lj_tag.md

@@ -9,8 +9,8 @@
 | name | varchar(512) | no | | 名字 | |
 | sort | int | no |  | tag排序 | |
 | status | smallint | no | | 状态 | |
-| create_time | timestamp | no | now | 创建时间 | |
-| update_time | timestamp | no | now | 更新时间 | | |
+| gmt_created | timestamp | no | now | 创建时间 | |
+| gmt_modified | timestamp | no | now | 更新时间 | | |
 
 ##### index
 > unique index (tag_code)

+ 2 - 2
db/product/lj_unit.md

@@ -10,8 +10,8 @@
 | digest | text | yes | null | 单元摘要 | |
 | sort | int | no |  | 排序 | |
 | status | smallint | no | | 状态 | |
-| create_time | smallint | no | now | 创建时间 | |
-| update_time | timestamp | no | now | 更新时间 | | |
+| gmt_created | smallint | no | now | 创建时间 | |
+| gmt_modified | timestamp | no | now | 更新时间 | | |
 
 ##### index
 > unique index u_code

+ 1 - 1
db/product/lj_unit_lesson_relation.md

@@ -7,7 +7,7 @@
 | id | bigint | no | | 主键 | pri |
 | u_code | varchar(512) | no | | 单元编码 | |
 | l_code | varchar(512) | no | | 课程编码 | |
-| create_time | smallint | no | now | 创建时间 | | |
+| gmt_created | smallint | no | now | 创建时间 | | |
 
 ##### index
 > unique index on(u_code, l_code)

+ 2 - 2
db/product/lj_ware.md

@@ -12,8 +12,8 @@
 | img_ids | varchar(512) | yes | null | 课件组图 | |
 | sort | int | no | 0 | 排序 | |
 | status | smallint | no | | 状态 | |
-| create_time | timestamp | no | now | 创建时间 | |
-| update_time | timestamp | no | now | 更新时间 | | |
+| gmt_created | timestamp | no | now | 创建时间 | |
+| gmt_modified | timestamp | no | now | 更新时间 | | |
 
 ##### index
 > unique index w_code

+ 15 - 0
db/resource/lj_resource.md

@@ -0,0 +1,15 @@
+### lj_resource table structure
+> 此表为资源存储对应的数据结构
+
+
+| field | type | null | default | desc | extra |
+|----|:-----|:-------|:------|:-----:|:-----:|
+| id | string | no | | 主键 | pri |
+| code | varchar(512) | yes | | 课编码 | uni |
+| name | varchar(1024) | no | null | 标题 | |
+| digest | text | yes | null | 课摘要 | |
+| url | varchar(1024) | no | | 地址 | |
+| status | smallint | no | | 状态 | |
+| tags | string | yes | null | 标签 | |
+| gmt_created | smallint | no | now | 创建时间 | |
+| gmt_modified | timestamp | no | now | 更新时间 | | |