添加初始化账号

This commit is contained in:
wuyanwen
2019-12-18 18:54:01 +08:00
parent 3d8b31b2dc
commit 57f6597e77
11 changed files with 303 additions and 2 deletions

View File

@@ -0,0 +1,21 @@
<?php
namespace {NAMESPACE};
use think\console\Command;
use think\console\Input;
use think\console\input\Argument;
use think\console\input\Option;
use think\console\Output;
class {CLASS}Command extends Command
{
protected function configure()
{
$this->setName('')
->setDescription('');
}
protected function execute(Input $input, Output $output)
{
}
}

View File

@@ -0,0 +1,35 @@
<?php
namespace {NAMESPACE};
use app\BaseController;
class {CLASS} extends BaseController
{
public function index()
{
return $this->fetch('{MODULE}::index');
}
public function create()
{
return $this->fetch('{MODULE}::create');
}
public function save()
{}
public function read()
{}
public function edit()
{
return $this->fetch('{MODULE}::edit');
}
public function update()
{}
public function delete()
{}
}

View File

@@ -0,0 +1,11 @@
<?php
declare (strict_types = 1);
namespace {NAMESPACE};
class {CLASS}
{
public function handle()
{
}
}

View File

@@ -0,0 +1,33 @@
<?php
use think\migration\Migrator;
use think\migration\db\Column;
class {CLASS} 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()
{
}
}

View File

@@ -0,0 +1,13 @@
{
"name": "",
"alias": "{MODULE}",
"description": "",
"keywords": [],
"order": 0,
"services": [
"{SERVICE}"
],
"aliases": {},
"files": [],
"requires": []
}

View File

@@ -0,0 +1,17 @@
<?php
namespace {NAMESPACE};
use catcher\base\BaseRequest;
class {CLASS}Request extends BaseRequest
{
/**
*
* @time 2019年11月27日
* @return string
*/
protected function getValidate()
{
// TODO: Implement getValidate() method.
}
}

View File

@@ -0,0 +1,5 @@
<?php
// you should user `$router`
// $router->get('index', 'controller@method');

View File

@@ -0,0 +1,19 @@
<?php
use think\migration\Seeder;
class {CLASS} extends Seeder
{
/**
* Run Method.
*
* Write your database seeder using this method.
*
* More information on writing seeders is available here:
* http://docs.phinx.org/en/latest/seeding.html
*/
public function run()
{
}
}

View File

@@ -0,0 +1,15 @@
<?php
namespace {NAMESPACE};
use think\Service;
class {CLASS}Service extends Service
{
/**
*
* @return void
*/
public function boot()
{
}
}