<?php


namespace app\admin\controller;


use app\admin\service\GenerateService;
use app\common\controller\Backend;

/**
 * 代码生成-控制器
 * @author 牧羊人
 * @since 2020/7/16
 * Class Generate
 * @package app\admin\controller
 */
class Generate extends Backend
{

    /**
     * 初始化
     * @author 牧羊人
     * @since 2020/7/15
     */
    public function initialize()
    {
        parent::initialize(); // TODO: Change the autogenerated stub
        $this->service = new GenerateService();
    }

    /**
     * 一键生成模块文件
     * @return mixed
     * @since 2020/7/15
     * @author 牧羊人
     */
    public function generate()
    {
        if (IS_POST) {
            return $this->service->generate();
        }
    }

}