Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zuiketang
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
zuiketang
Commits
c3fad6d6
Commit
c3fad6d6
authored
Oct 18, 2016
by
xiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改价格字段
parent
2fdfff1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
11 deletions
+25
-11
Course.php
src/common/models/Course.php
+23
-10
Orders.php
src/common/models/Orders.php
+2
-1
No files found.
src/common/models/Course.php
View file @
c3fad6d6
...
@@ -13,14 +13,18 @@ use yii\redis\ActiveRecord;
...
@@ -13,14 +13,18 @@ use yii\redis\ActiveRecord;
*
*
* @property integer $id
* @property integer $id
* @property integer $user_id
* @property integer $user_id
* @property integer $class
ed
_id
* @property integer $class_id
* @property string $name
* @property string $name
* @property
integer
$price
* @property
string
$price
* @property integer $free_time
* @property integer $free_time
* @property string $intro
* @property string $intro
* @property string $preview_pic
* @property string $preview_pic
* @property integer $recommend
* @property integer $recommend
* @property integer $status
* @property integer $status
* @property integer $play_count
* @property integer $comment_count
* @property integer $favorite_count
* @property integer $support_count
* @property integer $created_at
* @property integer $created_at
* @property integer $updated_at
* @property integer $updated_at
*/
*/
...
@@ -80,7 +84,7 @@ class Course extends \yii\db\ActiveRecord
...
@@ -80,7 +84,7 @@ class Course extends \yii\db\ActiveRecord
[
'name'
,
'string'
,
'length'
=>
[
1
,
60
]],
[
'name'
,
'string'
,
'length'
=>
[
1
,
60
]],
[[
'user_id'
,
'class_id'
],
'integer'
],
[[
'user_id'
,
'class_id'
],
'integer'
],
[
'intro'
,
'string'
],
[
'intro'
,
'string'
],
[
'price'
,
'integer'
,
'min'
=>
0
,
'max'
=>
9999
],
[
[
'price'
],
'number'
],
[
'free_time'
,
'integer'
,
'min'
=>
0
,
'max'
=>
15
],
[
'free_time'
,
'integer'
,
'min'
=>
0
,
'max'
=>
15
],
[
'recommend'
,
'boolean'
],
[
'recommend'
,
'boolean'
],
[[
'recommend'
,
'comment_count'
,
'favorite_count'
,
'support_count'
,
'play_count'
],
'default'
,
'value'
=>
0
],
[[
'recommend'
,
'comment_count'
,
'favorite_count'
,
'support_count'
,
'play_count'
],
'default'
,
'value'
=>
0
],
...
@@ -94,13 +98,22 @@ class Course extends \yii\db\ActiveRecord
...
@@ -94,13 +98,22 @@ class Course extends \yii\db\ActiveRecord
public
function
attributeLabels
()
public
function
attributeLabels
()
{
{
return
[
return
[
'teacher'
=>
'讲师'
,
'id'
=>
'ID'
,
'name'
=>
'标题'
,
'user_id'
=>
'User ID'
,
'price'
=>
'价格'
,
'class_id'
=>
'Class ID'
,
'free_time'
=>
'免费试看'
,
'name'
=>
'Name'
,
'intro'
=>
'课程介绍'
,
'price'
=>
'Price'
,
'preview_pic'
=>
'预览图'
,
'free_time'
=>
'Free Time'
,
'favorite_count'
=>
'favorite_count'
'intro'
=>
'Intro'
,
'preview_pic'
=>
'Preview Pic'
,
'recommend'
=>
'0 表示推荐 1推荐'
,
'status'
=>
'0 未审核 1 审核通过 2 审核不通过 3 锁定 '
,
'play_count'
=>
'播放次数'
,
'comment_count'
=>
'评论次数'
,
'favorite_count'
=>
'收藏次数'
,
'support_count'
=>
'点赞次数'
,
'created_at'
=>
'Created At'
,
'updated_at'
=>
'Updated At'
,
];
];
}
}
...
...
src/common/models/Orders.php
View file @
c3fad6d6
...
@@ -60,7 +60,8 @@ class Orders extends \yii\db\ActiveRecord
...
@@ -60,7 +60,8 @@ class Orders extends \yii\db\ActiveRecord
return
[
return
[
[[
'user_id'
,
'course_id'
,
'number'
,
'credit'
,
'pay_order'
],
'required'
],
[[
'user_id'
,
'course_id'
,
'number'
,
'credit'
,
'pay_order'
],
'required'
],
[[
'user_id'
,
'course_id'
,
'status'
,
'created_at'
,
'updated_at'
],
'integer'
],
[[
'user_id'
,
'course_id'
,
'status'
,
'created_at'
,
'updated_at'
],
'integer'
],
[[
'number'
,
'credit'
],
'string'
,
'max'
=>
32
],
[[
'number'
],
'string'
,
'max'
=>
32
],
[[
'credit'
],
'number'
],
[[
'pay_order'
],
'string'
,
'max'
=>
64
],
[[
'pay_order'
],
'string'
,
'max'
=>
64
],
];
];
}
}
...
...
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