jonathankablan / fast-entity-bundle
Symfony应用程序生成器 - 具有关系的实体
dev-master / 2.0.x-dev
2020-02-19 16:41 UTC
Requires
- php: ^7.1.3
- doctrine/common: ^2.8
- doctrine/doctrine-bundle: ^1.8|^2.0
- doctrine/orm: ^2.6.3
- doctrine/persistence: ^1.0
- symfony/asset: ^4.2|^5.0
- symfony/cache: ^4.2|^5.0
- symfony/config: ^4.2|^5.0
- symfony/dependency-injection: ^4.2|^5.0
- symfony/doctrine-bridge: ^4.2|^5.0
- symfony/event-dispatcher: ^4.2|^5.0
- symfony/expression-language: ^4.2|^5.0
- symfony/finder: ^4.2|^5.0
- symfony/form: ^4.2|^5.0
- symfony/framework-bundle: ^4.2|^5.0
- symfony/http-foundation: ^4.2|^5.0
- symfony/http-kernel: ^4.2|^5.0
- symfony/maker-bundle: ^1.0@dev
- symfony/polyfill-mbstring: ^1.7
- symfony/property-access: ^4.2|^5.0
- symfony/security-bundle: ^4.2|^5.0
- symfony/translation: ^4.2|^5.0
- symfony/twig-bridge: ^4.2|^5.0
- symfony/twig-bundle: ^4.2|^5.0
- symfony/validator: ^4.2|^5.0
- twig/twig: ^2.11.3|^3.0
Requires (Dev)
- doctrine/data-fixtures: ^1.3
- doctrine/doctrine-fixtures-bundle: ^3.0
- psr/log: ~1.0
- symfony/browser-kit: ^4.2|^5.0
- symfony/console: ^4.2|^5.0
- symfony/css-selector: ^4.2|^5.0
- symfony/dom-crawler: ^4.2|^5.0
- symfony/phpunit-bridge: ^4.3.5|^5.0
- symfony/var-dumper: ^4.2|^5.0
- symfony/yaml: ^4.2|^5.0
This package is auto-updated.
Last update: 2024-09-20 03:08:00 UTC
README
FastEntityBundle 组件包,通过配置yaml文件生成实体和关系
安装
$ composer require jonathankablan/fast-entity-bundle
命令
$ bin/console magic:entity
配置yaml
创建配置文件:fast_entity.yaml
Symfony_project/config/packages/fast_entity.yaml
fast_entity:
tables:
- { name: 'admin' }
- { name: 'formation' }
schema:
# User
- { entity: 'admin', property: 'username', type: 'string', length: 255, nullable: true }
- { entity: 'admin', property: 'password', type: 'string', length: 255, nullable: true }
- { entity: 'admin', property: 'email', type: 'string', length: 255, nullable: true }
- { entity: 'admin', property: 'active', type: 'boolean', nullable: true }
- { entity: 'admin', property: 'created', type: 'datetime', nullable: true }
- { entity: 'admin', property: 'updated', type: 'datetime', nullable: true }
# Conference
- { entity: 'formation', property: 'location', type: 'string', length: 255, nullable: true }
- { entity: 'formation', property: 'price', type: 'integer', length: 11, nullable: true }
- { entity: 'formation', property: 'created', type: 'datetime', nullable: true }
- { entity: 'formation', property: 'updated', type: 'datetime', nullable: true }
relations:
- { entityTo: 'admin', entityFrom: 'formation', relation: 'OneToOne' }