cblink-service / form-schema-sdk
Package description here.
v0.1.2
2023-03-07 07:38 UTC
Requires
- php: >=7.4
- cblink-service/form-sdk: ^0.1.0
This package is auto-updated.
Last update: 2024-12-07 11:18:54 UTC
README
.
Installing
$ composer require cblink-service/form-schema-sdk -vvv
Usage
use Cblink\Service\FormSchema\Table; use Cblink\Service\FormSchema\Schema; use Cblink\Service\FormSchema\Consts\FormSearchConst; $config = [ 'appid' => 'xxx', 'secret' => 'xxxx', // base_url ... ]; $schema = new Schema($config); $schema->table('category', function (Table $table) { $table->comment('分类'); $table->field('name')->label('分类名称')->rules(['required', 'string']) $table->field('sort')->label('权重')->default(999); $table->searchable('sort')->type(FormSearchConst::TYPE_EQ); // 不需要添加created_at 与 updated_at // ... });
Contributing
You can contribute in one of three ways:
- File bug reports using the issue tracker.
- Answer questions or fix bugs on the issue tracker.
- Contribute new features or update the wiki.
The code contribution process is not very formal. You just need to make sure that you follow the PSR-0, PSR-1, and PSR-2 coding guidelines. Any new code contributions must be accompanied by unit tests where applicable.
License
MIT