承接 nubitio/sequence-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nubitio/sequence-bundle

Composer 安装命令:

composer require nubitio/sequence-bundle

包简介

Opt-in atomic field numbering for Nubit Symfony apps via the Sequence attribute and a shared counter table.

README 文档

README

Opt-in atomic numbering for document fields.

Install

composer require nubitio/sequence-bundle

Create the counter table (once per app):

CREATE TABLE nubit_sequence_counter (
    id SERIAL PRIMARY KEY,
    scope_key VARCHAR(190) NOT NULL,
    name VARCHAR(64) NOT NULL,
    next_value INT NOT NULL DEFAULT 1,
    CONSTRAINT UNIQ_SEQUENCE_SCOPE_NAME UNIQUE (scope_key, name)
);

Or run a Doctrine migration that maps Nubit\SequenceBundle\Entity\SequenceCounter.

Usage

use Nubit\SequenceBundle\Attribute\Sequence;

#[Sequence(field: 'number', name: 'order', prefix: 'ORD-', padding: 4, scope: ['restaurant'])]
class Order
{
    // number is allocated on POST when left empty
}

Counters are isolated per scope (restaurant:1|…) and sequence name (order).

Frontend integration

The Hydra API doc publishes x-sequence on the resource class so @nubitio/react-admin hides the allocated field on create/edit forms and marks it read-only in the grid:

{
  "@id": "#Order",
  "x-sequence": {
    "field": "number",
    "name": "order",
    "prefix": "ORD-",
    "padding": 4,
    "scope": ["restaurant"]
  }
}

No manual visibleOnForm: false on the sequence property is required when the bundle is enabled.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-06-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固