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根据表创建实体的更多相关文章

  1. ABP入门系列之3——创建实体/Code First创建数据表

    一.首先来看看ABP体系结构 领域层就是业务层,是一个项目的核心,所有业务规则都应该在领域层实现.实体(Entity): 实体代表业务领域的数据和操作,在实践中,通过用来映射成数据库表.仓储(Repo ...

  2. Entity Framework 教程——创建实体数据模型

    创建实体数据模型: 本文将带你创建实体数据模型(EDM)SchoolDB数据库和理解基础建设模块. 实体数据模型(EDM)是用于描述实体之间关系的一种模型,以下将使用Visual Studio 201 ...

  3. 创建实体数据模型【Create Entity Data Model】(EF基础系列5)

    现在我要来为上面一节末尾给出的数据库(SchoolDB)创建实体数据模型: SchoolDB数据库的脚本我已经写好了,如下: USE master GO IF EXISTS(SELECT * FROM ...

  4. ABP入门系列(3)——领域层创建实体

    这一节我们主要和领域层打交道.首先我们要对ABP的体系结构以及从模板创建的解决方案进行一一对应.网上有代码生成器去简化我们这一步的任务,但是不建议初学者去使用. 一.首先来看看ABP体系结构 领域层就 ...

  5. Dynamic CRM 2013学习笔记(三)快速创建实体 EntityCreater

    一.实体简介 实体用于在 Microsoft Dynamics CRM 中建立业务数据模型和管理业务数据.例如,可以使用客户.市场活动和事件(案例)等实体跟踪和支持销售.市场营销和服务活动.实体具有一 ...

  6. EntityFramework_MVC4中EF5 新手入门教程之一 ---1.创建实体框架数据模型

    Contoso University  Web 应用程序 你会在这些教程中构建的应用程序是一个简单的大学网站. 用户可以查看和更新学生. 课程和教师信息.这里有几个屏幕,您将创建. 这个网站的用户界面 ...

  7. Sql Server 表创建以及Ef浅谈

    1.在数据库中新建两张测试表 创建用户表 use eftest go if exists(select * from sysobjects where name='UserInfo') drop ta ...

  8. Entity Framework入门教程:创建实体数据模型

    下图为一个已经创建好的数据库表关系 实体数据模型的创建过程 在Visual Studio项目中,右键程序集菜单,选择[添加]->[新建项],在[添加新项窗口]中选择[ADO.NET实体数据模型] ...

  9. ABP入门系列(2)——领域层创建实体

    ABP入门系列目录--学习Abp框架之实操演练 这一节我们主要和领域层打交道.首先我们要对ABP的体系结构以及从模板创建的解决方案进行一一对应.网上有代码生成器去简化我们这一步的任务,但是不建议初学者 ...

随机推荐

  1. Linux curl携带cookie测试接口

    问题: 休息在家,被告知要启动测试环境的一个定时任务,但是服务器在内网,连上vpn只能访问内网的开发环境,无法访问测试环境,于是进开发环境服务器,ping测试环境的ip,发现是通的,于是想到通过开发环 ...

  2. 抓包工具Burp Suite安装步骤(待补充)

    Burp Suite V2.1(破解版)安装步骤:(可以自行下载破解版或汉化版) 百度网盘下载地址: 链接:https://pan.baidu.com/s/1bU5JME3OsEsXrSirTdesR ...

  3. Charles抓包工具的用途及应用

    Charles抓包工具的用途: 排查问题,测试异常情况 注意:Charles不能直接抓https请求的包,需要用https://www.jianshu.com/p/ec0a38d9a8cf这个方法去配 ...

  4. 吴恩达《深度学习》-第五门课 序列模型(Sequence Models)-第三周 序列模型和注意力机制(Sequence models & Attention mechanism)-课程笔记

    第三周 序列模型和注意力机制(Sequence models & Attention mechanism) 3.1 序列结构的各种序列(Various sequence to sequence ...

  5. Anaconda是个什么东东?

     2020/5/18 一.Anaconda 有什么用? 是一个安装.管理python相关包的软件,还自带python.Jupyter Notebook.Spyder,有管理包的conda工具,非常有用 ...

  6. springcloud一些博文记录

    自己搭建完整demo后看的一个系列博文https://my.oschina.net/u/3375733/following 现在看着这个系列的后期文章估计出差前不会看了 一个博主的系列的git地址和博 ...

  7. spring framework源码之SpringFactoriesLoader

    SpringFactoriesLoader 查询META-INF/spring.factories的properties配置中指定class对应的所有实现类. public abstract clas ...

  8. .NET Core加解密实战系列之——使用BouncyCastle制作p12(.pfx)数字证书

    简介 加解密现状,编写此系列文章的背景: 需要考虑系统环境兼容性问题(Linux.Windows) 语言互通问题(如C#.Java等)(加解密本质上没有语言之分,所以原则上不存在互通性问题) 网上资料 ...

  9. IP地址的获取

    //ip地址的获取:非原创,之前在其他地方看到,拿过来备份下: public static String getIPAddress(HttpServletRequest request) { Stri ...

  10. Spring学习(七)--Spring的AOP

    1.实现AOP的方式:通过proxy代理对象.拦截器字码翻译等. 2.AOP体系分层图,从高到低,从使用到实现: 基础:待增强或者目标对象 切面:对基础的增强应用 配置:把基础和切面结合起来,完成切面 ...