swoft根据表创建实体
php bin/swoft entity:gen table= table1,table2,table3,...
[root@localhost swoft]# php bin/swoft entity:gen -y
2020/07/14-14:27:30 [INFO] Swoft\SwoftApplication:setSystemAlias(417) Project path: @base=/phpwww/wang/swoft
2020/07/14-14:27:30 [INFO] Swoft\SwoftApplication:setSystemAlias(418) Set alias @app=@base/app
2020/07/14-14:27:30 [INFO] Swoft\SwoftApplication:setSystemAlias(419) Set alias @config=@base/config
2020/07/14-14:27:30 [INFO] Swoft\SwoftApplication:setSystemAlias(420) Set alias @runtime=@base/runtime
2020/07/14-14:27:30 [INFO] Swoft\Processor\EnvProcessor:handle(60) Env file(/phpwww/wang/swoft/.env) is loaded
2020/07/14-14:27:33 [INFO] Swoft\Processor\AnnotationProcessor:handle(45) Annotations is scanned(autoloader 36, annotation 476, parser 93)
2020/07/14-14:27:33 [INFO] Swoft\Processor\BeanProcessor:handle(53) Bean is initialized(singleton 333, prototype 80, definition 50)
2020/07/14-14:27:33 [INFO] Swoft\Processor\BeanProcessor:handle(57) Config path is /phpwww/wang/swoft/config
2020/07/14-14:27:33 [INFO] Swoft\Processor\BeanProcessor:handle(62) Config env is not setting
2020/07/14-14:27:33 [INFO] Swoft\Processor\EventProcessor:handle(35) Event manager initialized(66 listener, 4 subscriber)
2020/07/14-14:27:33 [INFO] Swoft\WebSocket\Server\Listener\AppInitCompleteListener:handle(44) WebSocket server route registered(module 3, message command 14)
2020/07/14-14:27:33 [INFO] Swoft\Tcp\Server\Listener\AppInitCompleteListener:handle(45) Tcp server route registered(routes 4)
2020/07/14-14:27:33 [INFO] Swoft\Error\Listener\AppInitCompleteListener:handle(34) Error manager init completed(4 type, 5 handler, 5 exception)
2020/07/14-14:27:33 [INFO] Swoft\Processor\ConsoleProcessor:handle(36) Console command route registered (group 14, command 45)
Generate entity /phpwww/wang/swoft/app/Model/Entity/Member.php OK!
php bin/swoft entity:gen -y 生成所有
[root@localhost swoft]# php bin/swoft entity:gen -y
2020/07/14-14:28:33 [INFO] Swoft\SwoftApplication:setSystemAlias(417) Project path: @base=/phpwww/wang/swoft
2020/07/14-14:28:33 [INFO] Swoft\SwoftApplication:setSystemAlias(418) Set alias @app=@base/app
2020/07/14-14:28:33 [INFO] Swoft\SwoftApplication:setSystemAlias(419) Set alias @config=@base/config
2020/07/14-14:28:33 [INFO] Swoft\SwoftApplication:setSystemAlias(420) Set alias @runtime=@base/runtime
2020/07/14-14:28:33 [INFO] Swoft\Processor\EnvProcessor:handle(60) Env file(/phpwww/wang/swoft/.env) is loaded
2020/07/14-14:28:36 [INFO] Swoft\Processor\AnnotationProcessor:handle(45) Annotations is scanned(autoloader 36, annotation 476, parser 93)
2020/07/14-14:28:36 [INFO] Swoft\Processor\BeanProcessor:handle(53) Bean is initialized(singleton 333, prototype 80, definition 50)
2020/07/14-14:28:36 [INFO] Swoft\Processor\BeanProcessor:handle(57) Config path is /phpwww/wang/swoft/config
2020/07/14-14:28:36 [INFO] Swoft\Processor\BeanProcessor:handle(62) Config env is not setting
2020/07/14-14:28:36 [INFO] Swoft\Processor\EventProcessor:handle(35) Event manager initialized(66 listener, 4 subscriber)
2020/07/14-14:28:36 [INFO] Swoft\WebSocket\Server\Listener\AppInitCompleteListener:handle(44) WebSocket server route registered(module 3, message command 14)
2020/07/14-14:28:36 [INFO] Swoft\Tcp\Server\Listener\AppInitCompleteListener:handle(45) Tcp server route registered(routes 4)
2020/07/14-14:28:36 [INFO] Swoft\Error\Listener\AppInitCompleteListener:handle(34) Error manager init completed(4 type, 5 handler, 5 exception)
2020/07/14-14:28:36 [INFO] Swoft\Processor\ConsoleProcessor:handle(36) Console command route registered (group 14, command 45)
Generate entity /phpwww/wang/swoft/app/Model/Entity/Member.php OK!
Generate entity /phpwww/wang/swoft/app/Model/Entity/TbContent.php OK!
Generate entity /phpwww/wang/swoft/app/Model/Entity/TbMenus.php OK!
Usage:
bin/swoft entity:create [arguments ...] [options ...] Global Options:
--debug Setting the application runtime debug level(0 - 4)
--no-color Disable color/ANSI for message output
-h, --help Display help message for application or command
-V, --version Display application version information Arguments:
table STRING Database table names Options:
--exclude STRING Expect generate database table entity, alias is 'exc'
--field_prefix STRING Database field prefix ,alias is 'fp'
--path STRING Generate entity file path (defaults: @app/Model/Entity)
--pool STRING Choose default database pool (defaults: db.pool)
--remove_prefix STRING Remove table prefix ,alias is 'rp'
--table STRING Database table names
--table_prefix STRING Like match database table prefix, alias is 'tp'
--td STRING Generate entity template path (defaults: @devtool/devtool/resource/template)
-y STRING Auto generate
表名 tb_content
[root@localhost swoft]# php bin/swoft entity:create -d swoft --table tb_content --remove_prefix tb
Generate entity /phpwww/wang/swoft/app/Model/Entity/Content.php OK![root@localhost swoft]# php bin/swoft entity:create -d swoft --table tb_content --table_prefix tb_ --remove_prefix tb_
swoft根据表创建实体的更多相关文章
- ABP入门系列之3——创建实体/Code First创建数据表
一.首先来看看ABP体系结构 领域层就是业务层,是一个项目的核心,所有业务规则都应该在领域层实现.实体(Entity): 实体代表业务领域的数据和操作,在实践中,通过用来映射成数据库表.仓储(Repo ...
- Entity Framework 教程——创建实体数据模型
创建实体数据模型: 本文将带你创建实体数据模型(EDM)SchoolDB数据库和理解基础建设模块. 实体数据模型(EDM)是用于描述实体之间关系的一种模型,以下将使用Visual Studio 201 ...
- 创建实体数据模型【Create Entity Data Model】(EF基础系列5)
现在我要来为上面一节末尾给出的数据库(SchoolDB)创建实体数据模型: SchoolDB数据库的脚本我已经写好了,如下: USE master GO IF EXISTS(SELECT * FROM ...
- ABP入门系列(3)——领域层创建实体
这一节我们主要和领域层打交道.首先我们要对ABP的体系结构以及从模板创建的解决方案进行一一对应.网上有代码生成器去简化我们这一步的任务,但是不建议初学者去使用. 一.首先来看看ABP体系结构 领域层就 ...
- Dynamic CRM 2013学习笔记(三)快速创建实体 EntityCreater
一.实体简介 实体用于在 Microsoft Dynamics CRM 中建立业务数据模型和管理业务数据.例如,可以使用客户.市场活动和事件(案例)等实体跟踪和支持销售.市场营销和服务活动.实体具有一 ...
- EntityFramework_MVC4中EF5 新手入门教程之一 ---1.创建实体框架数据模型
Contoso University Web 应用程序 你会在这些教程中构建的应用程序是一个简单的大学网站. 用户可以查看和更新学生. 课程和教师信息.这里有几个屏幕,您将创建. 这个网站的用户界面 ...
- Sql Server 表创建以及Ef浅谈
1.在数据库中新建两张测试表 创建用户表 use eftest go if exists(select * from sysobjects where name='UserInfo') drop ta ...
- Entity Framework入门教程:创建实体数据模型
下图为一个已经创建好的数据库表关系 实体数据模型的创建过程 在Visual Studio项目中,右键程序集菜单,选择[添加]->[新建项],在[添加新项窗口]中选择[ADO.NET实体数据模型] ...
- ABP入门系列(2)——领域层创建实体
ABP入门系列目录--学习Abp框架之实操演练 这一节我们主要和领域层打交道.首先我们要对ABP的体系结构以及从模板创建的解决方案进行一一对应.网上有代码生成器去简化我们这一步的任务,但是不建议初学者 ...
随机推荐
- oracle之二redo日志
redo 日志 4.1 redo (重做) log 的功能:数据recovery4.2 redo log 特征: 1)记录数据库的变化(DML.DDL) 2)用于数据块的recover ...
- xss中shellcode的调用
shellcode就是利用漏洞所执行的代码 在完整的xss攻击之中,会将shellcode存放在一定的地方,然后触发漏洞,引发shellcode. 1.远程调用执行js 可将js代码单独放在一个js文 ...
- Proxy使用详解
文档:Proxy 基本使用就不赘述,看文档即可 通用 1.Proxy可以包装任何形式的对象:包括原生数组,函数,甚至另一个代理 2.代理实例中没有指定的handler,实际就是操作原对象target: ...
- 在 Flutter 中使用 TensorFlow Lite 插件实现文字分类
如果您希望能有一种简单.高效且灵活的方式把 TensorFlow 模型集成到 Flutter 应用里,那请您一定不要错过我们今天介绍的这个全新插件 tflite_flutter.这个插件的开发者是 G ...
- Spring使用@Async实现异步
使用场景 在实际项目中,一个接口如果需要处理很多数据,如果是同步执行,通过网络请求接口可能会出现请求超时.这时候就需要使用异步执行处理了. 使用经验 代码 异步服务类 @Service // Spri ...
- JDK13环境变量配置
第一步:下载JDK(开发工具包) JDK分为OracleJDK和OpenJDK下面简要说明 OracleJDK 部分代码闭源.商业收费 OpenJDK 开放源码.商业免费 两者大部分代码是共用的(除闭 ...
- Linux安装指定版Git以及卸载
来自于:https://www.cnblogs.com/rstyro/articles/10817855.html 安装Git 在linux中,安装Git 一般一条命令即可,如下: Debian/U ...
- 更新Jenkins
一般情况下,war的安装路径在/usr/share/jenkins目录下. 不过也有部分人不喜欢安装在这里,可以通过系统管理(System management)--> 系统信息(System ...
- 理解vue与MVVM三要素
MVVM到底是什么,跟Jquery有什么区别? MVVM理解,跟MVC区别 Model View Controller,一般是用户操作view视图按钮,触发controller内方法,cotrolle ...
- 修改默认配置文件.android.gradle.androidstudio到其他目录
.android 这个文件夹主要是用来存放模拟器的,是占用空间最大的一个,如果你没有使用它的模拟器,可以直接把这个文件夹删除.因为我建立了两个x86的模拟器,吃掉了我20G的空间.果断搬走. 复制当前 ...