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
2f1b9778
Commit
2f1b9778
authored
Sep 27, 2016
by
xiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
f9b80170
Changes
29
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
798 additions
and
4 deletions
+798
-4
main.php
common/config/main.php
+1
-1
m160927_104153_users_init.php
console/migrations/m160927_104153_users_init.php
+53
-0
m160927_113951_weixin_init.php
console/migrations/m160927_113951_weixin_init.php
+3
-1
m160927_114841_browse_record_init.php
console/migrations/m160927_114841_browse_record_init.php
+44
-0
m160927_115114_classes_init.php
console/migrations/m160927_115114_classes_init.php
+49
-0
m160927_115425_classes_teacher_init.php
console/migrations/m160927_115425_classes_teacher_init.php
+46
-0
m160927_120435_favorite_init.php
console/migrations/m160927_120435_favorite_init.php
+44
-0
m160927_120550_comments_init.php
console/migrations/m160927_120550_comments_init.php
+47
-0
m160927_120953_consume_init.php
console/migrations/m160927_120953_consume_init.php
+43
-0
m160927_121107_course_init.php
console/migrations/m160927_121107_course_init.php
+57
-0
m160927_121625_courseware_init.php
console/migrations/m160927_121625_courseware_init.php
+50
-0
m160927_122057_income_init.php
console/migrations/m160927_122057_income_init.php
+47
-0
m160927_122231_orders_init.php
console/migrations/m160927_122231_orders_init.php
+50
-0
m160927_122734_support_init.php
console/migrations/m160927_122734_support_init.php
+43
-0
m160927_122843_teacher_init.php
console/migrations/m160927_122843_teacher_init.php
+46
-0
m160927_123009_member_init.php
console/migrations/m160927_123009_member_init.php
+47
-0
ClassesInfoController.php
frontend/controllers/ClassesInfoController.php
+12
-0
HomeController.php
frontend/controllers/HomeController.php
+12
-0
MyCourseController.php
frontend/controllers/MyCourseController.php
+12
-0
MyIncomeController.php
frontend/controllers/MyIncomeController.php
+12
-0
MyMemberController.php
frontend/controllers/MyMemberController.php
+12
-0
TeacherManagerController.php
frontend/controllers/TeacherManagerController.php
+12
-0
index.php
frontend/views/classes-info/index.php
+9
-0
index.php
frontend/views/home/index.php
+9
-0
index.php
frontend/views/my-course/index.php
+9
-0
index.php
frontend/views/my-income/index.php
+9
-0
index.php
frontend/views/my-member/index.php
+9
-0
index.php
frontend/views/teacher-manager/index.php
+9
-0
.gitignore
frontend/web/.gitignore
+2
-2
No files found.
common/config/main.php
View file @
2f1b9778
...
@@ -15,7 +15,7 @@ return [
...
@@ -15,7 +15,7 @@ return [
],
],
'db'
=>
[
'db'
=>
[
'class'
=>
'yii\db\Connection'
,
'class'
=>
'yii\db\Connection'
,
'dsn'
=>
'mysql:host=192.168.1.185;dbname=zuiketang'
,
'dsn'
=>
'mysql:host=192.168.1.185;dbname=zuiketang
1
'
,
'username'
=>
'root'
,
'username'
=>
'root'
,
'password'
=>
'mysql123'
,
'password'
=>
'mysql123'
,
'charset'
=>
'utf8'
,
'charset'
=>
'utf8'
,
...
...
console/migrations/m160927_104153_users_init.php
0 → 100644
View file @
2f1b9778
<?php
use
yii\db\Migration
;
class
m160927_104153_users_init
extends
Migration
{
public
$table
=
'{{%users}}'
;
public
function
up
()
{
$tableOptions
=
NULL
;
if
(
$this
->
db
->
driverName
===
'mysql'
)
{
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions
=
'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'
;
}
$this
->
createTable
(
$this
->
table
,
[
'id'
=>
$this
->
primaryKey
()
->
unsigned
(),
'username'
=>
$this
->
string
()
->
notNull
()
->
unique
(),
'auth_key'
=>
$this
->
string
(
32
)
->
notNull
(),
'password_hash'
=>
$this
->
string
()
->
notNull
(),
'password_reset_token'
=>
$this
->
string
(
64
)
->
defaultValue
(
''
),
'telephone'
=>
$this
->
string
(
15
)
->
notNull
()
->
unique
(),
'role'
=>
$this
->
smallInteger
()
->
notNull
()
->
defaultValue
(
0
)
->
comment
(
'0 普通 1 讲师'
),
'status'
=>
$this
->
smallInteger
()
->
notNull
()
->
defaultValue
(
0
)
->
comment
(
'0 正常 1 锁定'
),
'avatar'
=>
$this
->
string
(
128
)
->
notNull
()
->
defaultValue
(
''
),
'wx_open_id'
=>
$this
->
string
(
32
)
->
defaultValue
(
''
)
->
comment
(
'登录微信id'
),
'ip'
=>
$this
->
string
(
32
)
->
notNull
(),
'created_at'
=>
$this
->
integer
()
->
notNull
(),
'updated_at'
=>
$this
->
integer
()
->
notNull
(),
'logged_at'
=>
$this
->
integer
()
->
notNull
()
],
$tableOptions
);
$this
->
createIndex
(
'index-id-status'
,
$this
->
table
,
[
'id'
,
'status'
],
TRUE
);
$this
->
createIndex
(
'index-wx_open_id'
,
$this
->
table
,
'wx_open_id'
);
}
public
function
down
()
{
$this
->
dropTable
(
$this
->
table
);
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}
console/migrations/m160927_113951_weixin_init.php
View file @
2f1b9778
...
@@ -24,11 +24,13 @@ class m160927_113951_weixin_init extends Migration
...
@@ -24,11 +24,13 @@ class m160927_113951_weixin_init extends Migration
'created_at'
=>
$this
->
integer
()
->
notNull
(),
'created_at'
=>
$this
->
integer
()
->
notNull
(),
'updated_at'
=>
$this
->
integer
()
->
notNull
(),
'updated_at'
=>
$this
->
integer
()
->
notNull
(),
],
$tableOptions
);
],
$tableOptions
);
$this
->
addCommentOnTable
(
$this
->
table
,
'用户绑定微信表'
);
$this
->
createIndex
(
'index-user_id'
,
$this
->
table
,
'user_id'
);
}
}
public
function
down
()
public
function
down
()
{
{
echo
"m160927_113951_winxin_init cannot be reverted.
\n
"
;
$this
->
dropTable
(
$this
->
table
);
$this
->
dropTable
(
$this
->
table
);
}
}
...
...
console/migrations/m160927_114841_browse_record_init.php
0 → 100644
View file @
2f1b9778
<?php
use
yii\db\Migration
;
class
m160927_114841_browse_record_init
extends
Migration
{
public
$table
=
'{{%browse_record}}'
;
public
function
up
()
{
$tableOptions
=
NULL
;
if
(
$this
->
db
->
driverName
===
'mysql'
)
{
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions
=
'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'
;
}
$this
->
createTable
(
$this
->
table
,
[
'id'
=>
$this
->
primaryKey
()
->
unsigned
(),
'user_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'course_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'time'
=>
$this
->
integer
()
->
notNull
(),
],
$tableOptions
);
$this
->
addCommentOnTable
(
$this
->
table
,
'浏览记录表'
);
$this
->
createIndex
(
'index-user_id'
,
$this
->
table
,
'user_id'
);
}
public
function
down
()
{
$this
->
dropTable
(
$this
->
table
);
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}
console/migrations/m160927_115114_classes_init.php
0 → 100644
View file @
2f1b9778
<?php
use
yii\db\Migration
;
class
m160927_115114_classes_init
extends
Migration
{
public
$table
=
'{{%classes}}'
;
public
function
up
()
{
$tableOptions
=
NULL
;
if
(
$this
->
db
->
driverName
===
'mysql'
)
{
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions
=
'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'
;
}
$this
->
createTable
(
$this
->
table
,
[
'id'
=>
$this
->
primaryKey
()
->
unsigned
(),
'user_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'id_number'
=>
$this
->
string
(
64
)
->
notNull
(),
'id_name'
=>
$this
->
string
(
64
)
->
notNull
(),
'name'
=>
$this
->
string
(
64
)
->
notNull
(),
'intro'
=>
$this
->
text
()
->
notNull
(),
'status'
=>
$this
->
smallInteger
()
->
notNull
()
->
defaultValue
(
0
)
->
comment
(
'0 未审核 1 审核通过 2 审核不通过 3 锁定 '
),
'created_at'
=>
$this
->
integer
()
->
notNull
(),
'updated_at'
=>
$this
->
integer
()
->
notNull
(),
],
$tableOptions
);
$this
->
addCommentOnTable
(
$this
->
table
,
'用户课堂表'
);
$this
->
createIndex
(
'index-user_id-status'
,
$this
->
table
,
[
'user_id'
,
'status'
]);
}
public
function
down
()
{
$this
->
dropTable
(
$this
->
table
);
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}
console/migrations/m160927_115425_classes_teacher_init.php
0 → 100644
View file @
2f1b9778
<?php
use
yii\db\Migration
;
class
m160927_115425_classes_teacher_init
extends
Migration
{
public
$table
=
'{{%classes_teacher}}'
;
public
function
up
()
{
$tableOptions
=
NULL
;
if
(
$this
->
db
->
driverName
===
'mysql'
)
{
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions
=
'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'
;
}
$this
->
createTable
(
$this
->
table
,
[
'class_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'teacher_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
],
$tableOptions
);
$this
->
addCommentOnTable
(
$this
->
table
,
'讲师课堂关系表'
);
$this
->
addPrimaryKey
(
'pk'
,
$this
->
table
,
[
'class_id'
,
'teacher_id'
]
);
}
public
function
down
()
{
$this
->
dropTable
(
$this
->
table
);
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}
console/migrations/m160927_120435_favorite_init.php
0 → 100644
View file @
2f1b9778
<?php
use
yii\db\Migration
;
class
m160927_120435_favorite_init
extends
Migration
{
public
$table
=
'{{%favorite}}'
;
public
function
up
()
{
$tableOptions
=
NULL
;
if
(
$this
->
db
->
driverName
===
'mysql'
)
{
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions
=
'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'
;
}
$this
->
createTable
(
$this
->
table
,
[
'id'
=>
$this
->
primaryKey
()
->
unsigned
(),
'user_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'course_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'created_at'
=>
$this
->
integer
()
->
notNull
(),
],
$tableOptions
);
$this
->
addCommentOnTable
(
$this
->
table
,
'收藏表'
);
$this
->
createIndex
(
'index-course_id'
,
$this
->
table
,
'course_id'
);
}
public
function
down
()
{
$this
->
dropTable
(
$this
->
table
);
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}
console/migrations/m160927_120550_comments_init.php
0 → 100644
View file @
2f1b9778
<?php
use
yii\db\Migration
;
class
m160927_120550_comments_init
extends
Migration
{
public
$table
=
'{{%comments}}'
;
public
function
up
()
{
$tableOptions
=
NULL
;
if
(
$this
->
db
->
driverName
===
'mysql'
)
{
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions
=
'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'
;
}
$this
->
createTable
(
$this
->
table
,
[
'id'
=>
$this
->
primaryKey
()
->
unsigned
(),
'user_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'course_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'parent_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'content'
=>
$this
->
text
()
->
notNull
(),
'ip'
=>
$this
->
string
(
32
)
->
notNull
(),
'created_at'
=>
$this
->
integer
()
->
notNull
(),
],
$tableOptions
);
$this
->
addCommentOnTable
(
$this
->
table
,
'评论表'
);
$this
->
createIndex
(
'index-course_id'
,
$this
->
table
,
'course_id'
);
}
public
function
down
()
{
$this
->
dropTable
(
$this
->
table
);
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}
console/migrations/m160927_120953_consume_init.php
0 → 100644
View file @
2f1b9778
<?php
use
yii\db\Migration
;
class
m160927_120953_consume_init
extends
Migration
{
public
$table
=
'{{%consume}}'
;
public
function
up
()
{
$tableOptions
=
NULL
;
if
(
$this
->
db
->
driverName
===
'mysql'
)
{
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions
=
'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'
;
}
$this
->
createTable
(
$this
->
table
,
[
'id'
=>
$this
->
primaryKey
()
->
unsigned
(),
'user_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'orders_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
],
$tableOptions
);
$this
->
addCommentOnTable
(
$this
->
table
,
'用户消费表'
);
$this
->
createIndex
(
'index-user_id'
,
$this
->
table
,
'user_id'
);
}
public
function
down
()
{
$this
->
dropTable
(
$this
->
table
);
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}
console/migrations/m160927_121107_course_init.php
0 → 100644
View file @
2f1b9778
<?php
use
yii\db\Migration
;
class
m160927_121107_course_init
extends
Migration
{
public
$table
=
'{{%course}}'
;
public
function
up
()
{
$tableOptions
=
NULL
;
if
(
$this
->
db
->
driverName
===
'mysql'
)
{
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions
=
'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'
;
}
$this
->
createTable
(
$this
->
table
,
[
'id'
=>
$this
->
primaryKey
()
->
unsigned
(),
'user_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'classed_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'avatar'
=>
$this
->
string
(
255
)
->
notNull
(),
'name'
=>
$this
->
string
(
32
)
->
notNull
(),
'price'
=>
$this
->
integer
()
->
notNull
(),
'free_time'
=>
$this
->
integer
()
->
notNull
(),
'intro'
=>
$this
->
text
()
->
notNull
(),
'preview_pic'
=>
$this
->
string
(
255
)
->
notNull
(),
'recommend'
=>
$this
->
smallInteger
()
->
notNull
()
->
defaultValue
(
0
)
->
comment
(
'0 表示推荐 1推荐'
),
'status'
=>
$this
->
smallInteger
()
->
notNull
()
->
defaultValue
(
0
)
->
comment
(
'0 未审核 1 审核通过 2 审核不通过 3 锁定 '
),
'created_at'
=>
$this
->
integer
()
->
notNull
(),
'updated_at'
=>
$this
->
integer
()
->
notNull
(),
],
$tableOptions
);
$this
->
createIndex
(
'index-user_id-status'
,
$this
->
table
,
[
'user_id'
,
'status'
],
FALSE
);
$this
->
addCommentOnTable
(
$this
->
table
,
'用户课程表'
);
}
public
function
down
()
{
$this
->
dropTable
(
$this
->
table
);
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}
console/migrations/m160927_121625_courseware_init.php
0 → 100644
View file @
2f1b9778
<?php
use
yii\db\Migration
;
class
m160927_121625_courseware_init
extends
Migration
{
public
$table
=
'{{%courseware}}'
;
public
function
up
()
{
$tableOptions
=
NULL
;
if
(
$this
->
db
->
driverName
===
'mysql'
)
{
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions
=
'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'
;
}
$this
->
createTable
(
$this
->
table
,
[
'id'
=>
$this
->
primaryKey
()
->
unsigned
(),
'user_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'course_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'type'
=>
$this
->
smallInteger
()
->
notNull
()
->
defaultValue
(
0
)
->
unsigned
()
->
comment
(
'课件类型 默认0'
),
'name'
=>
$this
->
string
(
128
)
->
notNull
(),
'status'
=>
$this
->
smallInteger
()
->
notNull
()
->
defaultValue
(
0
)
->
comment
(
'0 未审核 1 审核通过 2 审核不通过 3 锁定 '
),
'size'
=>
$this
->
string
(
32
)
->
notNull
()
->
comment
(
'文件大小 kb'
),
'time'
=>
$this
->
string
(
32
)
->
notNull
()
->
comment
(
'视频时间 秒'
),
'format'
=>
$this
->
string
(
16
)
->
notNull
()
->
comment
(
'格式'
),
'created_at'
=>
$this
->
integer
()
->
notNull
(),
'updated_at'
=>
$this
->
integer
()
->
notNull
(),
],
$tableOptions
);
$this
->
addCommentOnTable
(
$this
->
table
,
'用户课件表'
);
$this
->
createIndex
(
'index-course_id'
,
$this
->
table
,
'course_id'
);
}
public
function
down
()
{
$this
->
dropTable
(
$this
->
table
);
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}
console/migrations/m160927_122057_income_init.php
0 → 100644
View file @
2f1b9778
<?php
use
yii\db\Migration
;
class
m160927_122057_income_init
extends
Migration
{
public
$table
=
'{{%income}}'
;
public
function
up
()
{
$tableOptions
=
NULL
;
if
(
$this
->
db
->
driverName
===
'mysql'
)
{
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions
=
'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'
;
}
$this
->
createTable
(
$this
->
table
,
[
'id'
=>
$this
->
primaryKey
()
->
unsigned
(),
'user_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'orders_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'status'
=>
$this
->
smallInteger
()
->
notNull
()
->
defaultValue
(
0
)
->
comment
(
'0 未结算 1 结算 '
),
'created_at'
=>
$this
->
integer
()
->
notNull
(),
'updated_at'
=>
$this
->
integer
()
->
notNull
(),
],
$tableOptions
);
$this
->
addCommentOnTable
(
$this
->
table
,
'用户收入表'
);
$this
->
createIndex
(
'index-user_id-status'
,
$this
->
table
,
[
'user_id'
,
'status'
]);
$this
->
createIndex
(
'index-orders_id'
,
$this
->
table
,
'orders_id'
);
}
public
function
down
()
{
echo
"m160927_113951_winxin_init cannot be reverted.
\n
"
;
$this
->
dropTable
(
$this
->
table
);
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}
console/migrations/m160927_122231_orders_init.php
0 → 100644
View file @
2f1b9778
<?php
use
yii\db\Migration
;
class
m160927_122231_orders_init
extends
Migration
{
public
$table
=
'{{%orders}}'
;
public
function
up
()
{
$tableOptions
=
NULL
;
if
(
$this
->
db
->
driverName
===
'mysql'
)
{
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions
=
'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'
;
}
$this
->
createTable
(
$this
->
table
,
[
'id'
=>
$this
->
primaryKey
()
->
unsigned
(),
'user_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'course_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'number'
=>
$this
->
string
(
32
)
->
notNull
(),
'credit'
=>
$this
->
string
(
32
)
->
notNull
()
->
comment
(
'消费'
),
'status'
=>
$this
->
smallInteger
()
->
notNull
()
->
defaultValue
(
0
)
->
unsigned
()
->
comment
(
'0 未支付 1 已支付'
),
'pay_order'
=>
$this
->
string
(
64
)
->
notNull
()
->
comment
(
'第三方支付订单'
),
'created_at'
=>
$this
->
integer
()
->
notNull
(),
'updated_at'
=>
$this
->
integer
()
->
notNull
(),
],
$tableOptions
);
$this
->
addCommentOnTable
(
$this
->
table
,
'用户订单表'
);
$this
->
createIndex
(
'index-user_id'
,
$this
->
table
,
'user_id'
);
}
public
function
down
()
{
echo
"m160927_113951_winxin_init cannot be reverted.
\n
"
;
$this
->
dropTable
(
$this
->
table
);
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}
console/migrations/m160927_122734_support_init.php
0 → 100644
View file @
2f1b9778
<?php
use
yii\db\Migration
;
class
m160927_122734_support_init
extends
Migration
{
public
$table
=
'{{%support}}'
;
public
function
up
()
{
$tableOptions
=
NULL
;
if
(
$this
->
db
->
driverName
===
'mysql'
)
{
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions
=
'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'
;
}
$this
->
createTable
(
$this
->
table
,
[
'id'
=>
$this
->
primaryKey
()
->
unsigned
(),
'user_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'courseware_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'created_at'
=>
$this
->
integer
()
->
notNull
(),
],
$tableOptions
);
$this
->
addCommentOnTable
(
$this
->
table
,
'用户点赞表'
);
$this
->
createIndex
(
'index-courseware_id'
,
$this
->
table
,
'courseware_id'
);
}
public
function
down
()
{
$this
->
dropTable
(
$this
->
table
);
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}
console/migrations/m160927_122843_teacher_init.php
0 → 100644
View file @
2f1b9778
<?php
use
yii\db\Migration
;
class
m160927_122843_teacher_init
extends
Migration
{
public
$table
=
'{{%teacher}}'
;
public
function
up
()
{
$tableOptions
=
NULL
;
if
(
$this
->
db
->
driverName
===
'mysql'
)
{
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions
=
'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'
;
}
$this
->
createTable
(
$this
->
table
,
[
'id'
=>
$this
->
primaryKey
()
->
unsigned
(),
'user_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'name'
=>
$this
->
string
(
64
)
->
notNull
(),
'avatar'
=>
$this
->
string
(
255
)
->
notNull
(),
'intro'
=>
$this
->
text
()
->
notNull
(
''
),
'created_at'
=>
$this
->
integer
()
->
notNull
(),
'updated_at'
=>
$this
->
integer
()
->
notNull
(),
],
$tableOptions
);
$this
->
addCommentOnTable
(
$this
->
table
,
'讲师表'
);
$this
->
createIndex
(
'index-user_id'
,
$this
->
table
,
'user_id'
);
}
public
function
down
()
{
$this
->
dropTable
(
$this
->
table
);
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}
console/migrations/m160927_123009_member_init.php
0 → 100644
View file @
2f1b9778
<?php
use
yii\db\Migration
;
class
m160927_123009_member_init
extends
Migration
{
public
$table
=
'{{%member}}'
;
public
function
up
()
{
$tableOptions
=
NULL
;
if
(
$this
->
db
->
driverName
===
'mysql'
)
{
// http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
$tableOptions
=
'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB'
;
}
$this
->
createTable
(
$this
->
table
,
[
'id'
=>
$this
->
primaryKey
()
->
unsigned
(),
'user_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'member_id'
=>
$this
->
integer
()
->
notNull
()
->
unsigned
(),
'type'
=>
$this
->
smallInteger
()
->
notNull
()
->
unsigned
()
->
comment
(
'会员类型 0 未付费 1 付费'
),
'created_at'
=>
$this
->
integer
()
->
notNull
(),
'updated_at'
=>
$this
->
integer
()
->
notNull
(),
],
$tableOptions
);
$this
->
addCommentOnTable
(
$this
->
table
,
'用户会员表'
);
$this
->
createIndex
(
'index-user_id'
,
$this
->
table
,
'user_id'
);
}
public
function
down
()
{
echo
"m160927_113951_winxin_init cannot be reverted.
\n
"
;
$this
->
dropTable
(
$this
->
table
);
}
/*
// Use safeUp/safeDown to run migration code within a transaction
public function safeUp()
{
}
public function safeDown()
{
}
*/
}
frontend/controllers/ClassesInfoController.php
0 → 100644
View file @
2f1b9778
<?php
namespace
frontend\controllers
;
class
ClassesInfoController
extends
\yii\web\Controller
{
public
function
actionIndex
()
{
return
$this
->
render
(
'index'
);
}
}
frontend/controllers/HomeController.php
0 → 100644
View file @
2f1b9778
<?php
namespace
frontend\controllers
;
class
HomeController
extends
\yii\web\Controller
{
public
function
actionIndex
()
{
return
$this
->
render
(
'index'
);
}
}
frontend/controllers/MyCourseController.php
0 → 100644
View file @
2f1b9778
<?php
namespace
frontend\controllers
;
class
MyCourseController
extends
\yii\web\Controller
{
public
function
actionIndex
()
{
return
$this
->
render
(
'index'
);
}
}
frontend/controllers/MyIncomeController.php
0 → 100644
View file @
2f1b9778
<?php
namespace
frontend\controllers
;
class
MyIncomeController
extends
\yii\web\Controller
{
public
function
actionIndex
()
{
return
$this
->
render
(
'index'
);
}
}
frontend/controllers/MyMemberController.php
0 → 100644
View file @
2f1b9778
<?php
namespace
frontend\controllers
;
class
MyMemberController
extends
\yii\web\Controller
{
public
function
actionIndex
()
{
return
$this
->
render
(
'index'
);
}
}
frontend/controllers/TeacherManagerController.php
0 → 100644
View file @
2f1b9778
<?php
namespace
frontend\controllers
;
class
TeacherManagerController
extends
\yii\web\Controller
{
public
function
actionIndex
()
{
return
$this
->
render
(
'index'
);
}
}
frontend/views/classes-info/index.php
0 → 100644
View file @
2f1b9778
<?php
/* @var $this yii\web\View */
?>
<h1>
classes-info/index
</h1>
<p>
You may change the content of this page by modifying
the file
<code>
<?=
__FILE__
;
?>
</code>
.
</p>
frontend/views/home/index.php
0 → 100644
View file @
2f1b9778
<?php
/* @var $this yii\web\View */
?>
<h1>
home/index
</h1>
<p>
You may change the content of this page by modifying
the file
<code>
<?=
__FILE__
;
?>
</code>
.
</p>
frontend/views/my-course/index.php
0 → 100644
View file @
2f1b9778
<?php
/* @var $this yii\web\View */
?>
<h1>
my-course/index
</h1>
<p>
You may change the content of this page by modifying
the file
<code>
<?=
__FILE__
;
?>
</code>
.
</p>
frontend/views/my-income/index.php
0 → 100644
View file @
2f1b9778
<?php
/* @var $this yii\web\View */
?>
<h1>
my-income/index
</h1>
<p>
You may change the content of this page by modifying
the file
<code>
<?=
__FILE__
;
?>
</code>
.
</p>
frontend/views/my-member/index.php
0 → 100644
View file @
2f1b9778
<?php
/* @var $this yii\web\View */
?>
<h1>
my-member/index
</h1>
<p>
You may change the content of this page by modifying
the file
<code>
<?=
__FILE__
;
?>
</code>
.
</p>
frontend/views/teacher-manager/index.php
0 → 100644
View file @
2f1b9778
<?php
/* @var $this yii\web\View */
?>
<h1>
teacher-manager/index
</h1>
<p>
You may change the content of this page by modifying
the file
<code>
<?=
__FILE__
;
?>
</code>
.
</p>
frontend/web/.gitignore
View file @
2f1b9778
/index.php
/index.php
/index-test.php
/index-test.php
/js/node_modules/*
/node_modules/*
/js/assets/*
/assets/*
\ No newline at end of file
\ No newline at end of file
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