ama/symfony-mongo-maker-bundle

Mongo 文档、DTO 和控制器 CRUD 生成器,由 nelmio-api-doc 自动生成

安装: 82

依赖: 0

建议: 0

安全: 0

星级: 0

分支: 0

类型:symfony-bundle

1.0.0.x-dev 2023-09-13 09:53 UTC

This package is auto-updated.

Last update: 2024-09-07 15:38:27 UTC


README

Mongo 扩展包 - 开发中...

这个扩展包是我第一个扩展包,目前仅用于私人项目。您可以在这里找到我的代码库链接:点击此处

它实现了两个 symfony 命令

1 - mongo:make:document --nocrud name

* name is optionnal, it will be ask as first question if it's not provided
* --nocrud prevent creation of document and a controller and creates only the DTO class

2 - mongo:make:controller (with no option, allow to create controllers not linked to a document - usefull for gateways api)

生成器以 symfony 原生 ORM 实体生成器的方式工作

它将询问文档(或控制器)的名称,然后对于每个属性:名称、类型以及是否可空。然后,它将创建一个文档、一个功能性的 CRUD 控制器和 DTO 类。如果未提供 --nocrud 选项,则文档和控制器将使用 nelmio 基本文档实现,以便创建 swagger。