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的体系结构以及从模板创建的解决方案进行一一对应.网上有代码生成器去简化我们这一步的任务,但是不建议初学者 ...
随机推荐
- python之class Meta用法
Django model中的 class Meta 详解 通过一个内嵌类 "class Meta" 给你的 model 定义元数据, 类似下面这样: class Foo(mod ...
- oracle数据处理之expdb/impdb
Oracle 数据泵的使用方法 一.新建逻辑目录 最好以system等管理员创建逻辑目录,Oracle不会自动创建实际的物理目录“D:\oracleData”(务必手动创建此目录),仅仅是进行定义逻辑 ...
- 【吴恩达课程使用】anaconda (python 3.7) win10安装 tensorflow 1.8 cpu版
[吴恩达课程使用]anaconda (python 3.7) win10安装 tensorflow 1.8 目前tensorflow是只支持到python3.6的,anaconda最新版本已经到pyt ...
- MySQL的事务机制和锁(InnoDB引擎、MVCC多版本并发控制技术)
一.事务(数据库的事务都通用的定义) 1.1 事务定义 事务是由一步或几步数据库操作序列组成逻辑执行单元,这系列操作要么全部执行,要么全部放弃执行.事务通常以 BEGIN TRANSACTION 开始 ...
- hadoop和hbase高可用模式部署
记录apache版本的hadoop和hbase的安装,并启用高可用模式. 1. 主机环境 我这里使用的操作系统是centos 6.5,安装在vmware上,共三台. 主机名 IP 操作系统 用户名 安 ...
- 新手接触springboot
新手使用springboot或者说,刚接触java行业,有些不明白的就是项目的架构是怎么样的,我今天在这儿稍微整理了一下 有些新手可能在想,springboot是怎么解决最原始的增-删-改-查, 快速 ...
- Java io实现读取文件特殊内容进行替换
最近公司在做一个项目其中一个需求是读取文件中的特殊字符在其后进行添加或删除字符操作,本来想直接使用randomAccessFile按行读取,读取到特殊字符就进行添加或删除操作,但是randomAcce ...
- CentOS 正在连接 127.0.0.1:8118... 失败:拒绝连接。
今天centos使用wget下载东西的时候出现了 看下是否开启了代理 yicunyiye@yicunyiye:~/redis$ export | grep -i proxy declare -x ft ...
- lombok使用(给自己看的,只为不要忘记自己用过的技术)
如何使用? 一.1)eclipse使用方法 1. 从项目首页下载lombok.jar 2. 双击lombok.jar, 将其安装到eclipse中(该项目需要jdk1.6+的环境) 2)idea使用方 ...
- 【Flutter 实战】大量复杂数据持久化
老孟导读:上一篇文章讲解了 Android 和 iOS 的文件目录系统,此篇文章讲解如何使用 SQLite 保存数据. 欢迎大家投稿:http://laomengit.com/plan/Contrib ...