Commit 5ca6860e authored by xiabin's avatar xiabin

添加src_stand 以及src_free

parent 9b4235e2
...@@ -14,6 +14,8 @@ use yii\db\ActiveRecord; ...@@ -14,6 +14,8 @@ use yii\db\ActiveRecord;
* @property integer $course_id * @property integer $course_id
* @property integer $type * @property integer $type
* @property string $name * @property string $name
* @property string $src_stand
* @property string $src_free
* @property integer $status * @property integer $status
* @property string $size * @property string $size
* @property int $time * @property int $time
...@@ -52,6 +54,7 @@ class Courseware extends ActiveRecord ...@@ -52,6 +54,7 @@ class Courseware extends ActiveRecord
[['user_id', 'course_id', 'type', 'status', 'size', 'time'], 'integer'], [['user_id', 'course_id', 'type', 'status', 'size', 'time'], 'integer'],
[['name'], 'string', 'max' => 128], [['name'], 'string', 'max' => 128],
[['format'], 'string', 'max' => 16], [['format'], 'string', 'max' => 16],
[['src_stand', 'src_free'], 'default', 'value' => ''],
[['comment_count', 'favorite_count', 'support_count', 'play_count'], 'default', 'value' => 0], [['comment_count', 'favorite_count', 'support_count', 'play_count'], 'default', 'value' => 0],
]; ];
...@@ -68,6 +71,8 @@ class Courseware extends ActiveRecord ...@@ -68,6 +71,8 @@ class Courseware extends ActiveRecord
'course_id' => 'Course ID', 'course_id' => 'Course ID',
'type' => '课件类型 默认0', 'type' => '课件类型 默认0',
'name' => 'Name', 'name' => 'Name',
'src_stand' => 'Src Stand',
'src_free' => 'Src Free',
'status' => '0 未审核 1 审核通过 2 审核不通过 3 锁定 ', 'status' => '0 未审核 1 审核通过 2 审核不通过 3 锁定 ',
'size' => '文件大小 kb', 'size' => '文件大小 kb',
'time' => '视频时间 秒', 'time' => '视频时间 秒',
......
...@@ -20,6 +20,8 @@ class m160927_121625_courseware_init extends Migration ...@@ -20,6 +20,8 @@ class m160927_121625_courseware_init extends Migration
'course_id' => $this->integer()->notNull()->unsigned(), 'course_id' => $this->integer()->notNull()->unsigned(),
'type' => $this->smallInteger()->notNull()->defaultValue(0)->unsigned()->comment('课件类型 默认0'), 'type' => $this->smallInteger()->notNull()->defaultValue(0)->unsigned()->comment('课件类型 默认0'),
'name' => $this->string(128)->notNull(), 'name' => $this->string(128)->notNull(),
'src_stand' => $this->string(128)->notNull(),
'src_free' => $this->string(128)->notNull(),
'status' => $this->smallInteger()->notNull()->defaultValue(0)->comment('0 未审核, 1 审核通过, 2 审核不通过, 3 锁定'), 'status' => $this->smallInteger()->notNull()->defaultValue(0)->comment('0 未审核, 1 审核通过, 2 审核不通过, 3 锁定'),
'size' => $this->integer(10)->notNull()->unsigned()->comment('文件大小/bytes'), 'size' => $this->integer(10)->notNull()->unsigned()->comment('文件大小/bytes'),
'time' => $this->smallInteger(8)->unsigned()->notNull()->comment('视频时间/秒'), 'time' => $this->smallInteger(8)->unsigned()->notNull()->comment('视频时间/秒'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment