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. List和Dictionary的使用技巧总结

    List和Dictionary想必是我们平常用到最多的C#容器了,他们使用起来都很简单,所以很多人就可能就没去深究,其实在使用过程中有很多的小技巧能让我们写的代码变得更高效也更安全. 1·合理的指定初 ...

  2. [LeetCode]Sql系列2

    题目 1205. 每月交易II Transactions 记录表 +----------------+---------+ | Column Name | Type | +-------------- ...

  3. 归并排序求逆序对(poj 2299)

    归并排序求逆序对 题目大意 给你多个序列,让你求出每个序列中逆序对的数量. 输入:每组数据以一个数 n 开头,以下n行,每行一个数字,代表这个序列: 输出:对于输出对应该组数据的逆序对的数量: 顺便在 ...

  4. python文件的相关操作

    python 目录 python 1.python文件的介绍 使用文件的目的 Python文件的类型主要有两种:文本文件和二进制文件. 操作文件的流程主要有三步:打开-操作-关闭操作. 2.文件的打开 ...

  5. 基于abp的小小设备控制系统设计

    客户有一堆小设备,需要通过小程序来控制它们,主要是设备门的开关.电源开关.状态查询.压力控制等.下面主要纪录下设计思路.源码地址:https://gitee.com/bxjg1987/abp 最初的设 ...

  6. 最火的开源 IDE介绍与安装教程

    导读:开发C/C++最好的IDE是什么,尤其对于很多初学者来说用什么IDE比较容易上手,本文将做以介绍,并为您演示如何下载与安装. 本文字数:1015,阅读时长大约:10分钟 (一)最火的开源IDE ...

  7. Kubernetes入门(四)——如何在Kubernetes中部署一个可对外服务的Tensorflow机器学习模型

    机器学习模型常用Docker部署,而如何对Docker部署的模型进行管理呢?工业界的解决方案是使用Kubernetes来管理.编排容器.Kubernetes的理论知识不是本文讨论的重点,这里不再赘述, ...

  8. 容器云平台No.8~kubernetes负载均衡之ingress-nginx

    Ingress 是什么? Ingress 公开了从集群外部到集群内服务的 HTTP 和 HTTPS 路由. 流量路由由 Ingress 资源上定义的规则控制. 可以将 Ingress 配置为服务提供外 ...

  9. dubbo学习(二)配置dubbo XML方式配置

    provider(生产者) <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo= ...

  10. spring cloud微服务快速教程之(十四)spring cloud feign使用okhttp3--以及feign调用参数丢失的说明

    0-前言 spring cloud feign 默认使用httpclient,需要okhttp3的可以进行切换 当然,其实两者性能目前差别不大,差别较大的是很早之前的版本,所以,喜欢哪个自己选择: 1 ...