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的体系结构以及从模板创建的解决方案进行一一对应.网上有代码生成器去简化我们这一步的任务,但是不建议初学者 ...
随机推荐
- Iterator泛型指针
Iterator泛型指针 每个标准容器都提供一个名为: begin()的操作函数,返回一个iterator指向第一个元素: end()操作函数,返回一个iterator指向最后一个元素的下一位置: 定 ...
- Qt Qgis 二次开发——鼠标点击识别矢量要素
Qt Qgis 二次开发--鼠标点击识别矢量要素 介绍: 识别矢量要素需要用到QGis的一个工具类:QgsMapToolIdentifyFeature 一个QgsMapTool的子类的子类,官方文档描 ...
- pytest封神之路第三步 精通fixture
首先放一句"狠话". 如果你不会fixture,那么你最好别说自己会pytest. (只是为了烘托主题哈,手上的砖头可以放下了,手动滑稽) fixture是什么 看看源码 def ...
- python 第二节课内容和练习
一.列表 []表示列表,用','进行分隔,list有序 能够进行索引 切片 (in append extend count index insert pop remove,reverse sort c ...
- Python记录日志模块推荐-loguru!
作者:小张学Python 本文链接: https://mp.weixin.qq.com/s/dkNkEohPl6H2VopUrpxxZg 转载请注明来源!! 前言 在做项目的时候一直在用Pytho ...
- ERP与EHR系统的恩怨纠葛--开源软件诞生13
ERP中需要EHR的存在吗--第13篇 用日志记录"开源软件"的诞生 [点亮星标]----祈盼着一个鼓励 博主开源地址: 码云:https://gitee.com/redragon ...
- Oracle添加键值对盲注
前言 遇到一种注入点,存在于POST参数中,却不能用sqlmap扫出: 分析 request参数格式: %24Q_value1=test1&orderCol=&order=+ASC+& ...
- HTTP协议学习之Request学习
在开始前,我们首先对HTTP协议做个简单的了解 HTTP协议(Hyper Text Transfer Protocol) 超文本传输协议 名词非常的高大上,如果学过计算机网络这门课(再如果还有一点印象 ...
- 极简 Node.js 入门 - 4.3 可读流
极简 Node.js 入门系列教程:https://www.yuque.com/sunluyong/node 本文更佳阅读体验:https://www.yuque.com/sunluyong/node ...
- 神作!阿里首发并发编程神仙笔记,Github已星标92K
Qzone 微信 神作!阿里首发并发编程神仙笔记,Github已星标92K JAVA超神编程 2020-09-23 21:04:06 JVM 无论什么级别的Java从业者,JVM都是进阶时必须迈过的坎 ...