完成学校与教师
This commit is contained in:
1 parent
25cc4897eb
commit
0dbee995fc
41 files changed
+2118
-37
No files matched your search
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class Teacher extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 定义数据表名称
|
||||
$table = $this->table('teacher');
|
||||
|
||||
// 添加当前表字段
|
||||
$table
|
||||
->addColumn('xingming','string',['limit'=>8,'null'=>false,'comment'=>'姓名'])
|
||||
->addColumn('sex','boolean',['limit'=>1,'default'=>2,'null'=>false,'comment'=>'性别'])
|
||||
->addColumn('shengri','string',['limit'=>11,'null'=>true,'comment'=>'生日'])
|
||||
->addColumn('worktime','string',['limit'=>11,'null'=>true,'comment'=>'工作时间'])
|
||||
->addColumn('zhiwu','string',['limit'=>11,'null'=>true,'comment'=>'职务'])
|
||||
->addColumn('zhicheng','string',['limit'=>11,'null'=>true,'comment'=>'职称'])
|
||||
->addColumn('danwei','string',['limit'=>11,'null'=>false,'comment'=>'现工作单位'])
|
||||
->addColumn('biye','string',['limit'=>50,'null'=>true,'comment'=>'毕业学校'])
|
||||
->addColumn('zhuanye','string',['limit'=>20,'null'=>true,'comment'=>'专业'])
|
||||
->addColumn('xueli','string',['limit'=>20,'null'=>true,'comment'=>'学历'])
|
||||
->addColumn('quanpin','string',['limit'=>30,'null'=>false,'comment'=>'全拼'])
|
||||
->addColumn('shoupin','string',['limit'=>5,'null'=>false,'comment'=>'简拼'])
|
||||
->addColumn('status','boolean',['limit'=>1,'default'=>true,'null'=>false,'comment'=>'状态'])
|
||||
->addColumn('delete_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间'])
|
||||
->addColumn('create_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间'])
|
||||
->addColumn('update_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间'])
|
||||
->addColumn('beizhu','string',['limit'=>80,'null'=>true,'comment'=>'备注'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class Xueqi extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 定义数据表名称
|
||||
$table = $this->table('xueqi');
|
||||
|
||||
// 添加当前表字段
|
||||
$table
|
||||
->addColumn('title','string',['limit'=>25,'null'=>false,'comment'=>'学期标题'])
|
||||
->addColumn('xuenan','string',['limit'=>15,'null'=>false,'comment'=>'学年标题'])
|
||||
->addColumn('catagory','string',['limit'=>11,'null'=>false,'comment'=>'学期分类'])
|
||||
->addColumn('bfdate','string',['limit'=>11,'null'=>false,'comment'=>'开始日期'])
|
||||
->addColumn('endate','string',['limit'=>11,'null'=>false,'comment'=>'结束日期'])
|
||||
->addColumn('status','boolean',['limit'=>1,'default'=>'1','null'=>false,'comment'=>'0=禁用,1=正常'])
|
||||
->addColumn('create_time','integer',['limit'=>11,'null'=>true,'comment'=>'创建时间'])
|
||||
->addColumn('update_time','integer',['limit'=>11,'null'=>true,'comment'=>'更新时间'])
|
||||
->addColumn('delete_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间'])
|
||||
->addColumn('beizhu','string',['limit'=>80,'null'=>true,'comment'=>'备注'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use think\migration\Migrator;
|
||||
use think\migration\db\Column;
|
||||
|
||||
class Kaoshi extends Migrator
|
||||
{
|
||||
/**
|
||||
* Change Method.
|
||||
*
|
||||
* Write your reversible migrations using this method.
|
||||
*
|
||||
* More information on writing migrations is available here:
|
||||
* http://docs.phinx.org/en/latest/migrations.html#the-abstractmigration-class
|
||||
*
|
||||
* The following commands can be used in this method and Phinx will
|
||||
* automatically reverse them when rolling back:
|
||||
*
|
||||
* createTable
|
||||
* renameTable
|
||||
* addColumn
|
||||
* renameColumn
|
||||
* addIndex
|
||||
* addForeignKey
|
||||
*
|
||||
* Remember to call "create()" or "update()" and NOT "save()" when working
|
||||
* with the Table class.
|
||||
*/
|
||||
public function change()
|
||||
{
|
||||
// 定义数据表名称
|
||||
$table = $this->table('kaoshi');
|
||||
|
||||
// 添加当前表字段
|
||||
$table
|
||||
->addColumn('title','string',['limit'=>25,'null'=>false,'comment'=>'考试名称'])
|
||||
->addColumn('xueqi','string',['limit'=>11,'null'=>false,'comment'=>'学期'])
|
||||
->addColumn('bfdate','string',['limit'=>11,'null'=>false,'comment'=>'开始日期'])
|
||||
->addColumn('endate','string',['limit'=>11,'null'=>false,'comment'=>'结束日期'])
|
||||
->addColumn('status','boolean',['limit'=>1,'default'=>'1','null'=>false,'comment'=>'0=禁用,1=正常'])
|
||||
->addColumn('create_time','integer',['limit'=>11,'null'=>true,'comment'=>'创建时间'])
|
||||
->addColumn('update_time','integer',['limit'=>11,'null'=>true,'comment'=>'更新时间'])
|
||||
->addColumn('delete_time','integer',['limit'=>11,'null'=>true,'comment'=>'删除时间'])
|
||||
->addColumn('beizhu','string',['limit'=>80,'null'=>true,'comment'=>'备注'])
|
||||
->create();
|
||||
}
|
||||
}
|
||||
Loaded 3 of 41 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user