logologo
开始
教程
手册
开发
插件
API
首页
English
简体中文
日本語
한국어
Español
Português
Deutsch
Français
Русский
开始
教程
手册
开发
插件
API
首页
logologo
API Overview

@nocobase/auth

AuthManager
Auth
BaseAuth

@nocobase/cache

CacheManager
Cache

@nocobase/cli

NocoBase CLI
全局环境变量

@nocobase/client

Application (Client)
Plugin (Client)

@nocobase/database

Collection
Field

interfaces

BaseInterface
Filter Operators

RelationRepository

BelongsToManyRepository
BelongsToRepository
HasManyRepository
HasOneRepository
Repository

Repository 共享参数

CreateOptions
DestroyOptions
FindOneOptions
FindOptions
Transaction 事务参数
UpdateOptions

@nocobase/data-source-manager

DataSourceManager
DataSource (abstract)
ICollectionManager
ICollection
IField
IModel
IRepository

@nocobase/flow-engine

DataSourceManager (FlowEngine)
FlowContext
FlowEngine
FlowModel
FlowResource

@nocobase/logger

Logger

@nocobase/server

AppCommand
Application (Server)
AuditManager
Context (Server)
Migration
Plugin (Server)

@nocobase/sdk

Auth (SDK)
Storage (SDK)

@nocobase/telemetry

Metric
Telemetry
Trace
Previous PageICollectionManager
Next PageIField

#ICollection

ICollection 是数据模型的接口,其中包含了模型的名称、字段、关联等信息。

export interface ICollection {
  repository: IRepository;

  updateOptions(options: any): void;

  setField(name: string, options: any): IField;

  removeField(name: string): void;

  getFields(): Array<IField>;

  getField(name: string): IField;

  [key: string]: any;
}

#成员

#repository

ICollection 所属的 Repository 实例

#API

#updateOptions()

更新 Collection 的属性

#签名

  • updateOptions(options: any): void

#setField()

设置 Collection 的字段

#签名

  • setField(name: string, options: any): IField

#removeField()

移除 Collection 的字段

#签名

  • removeField(name: string): void

#getFields()

获取 Collection 的所有字段

#签名

  • getFields(): Array<IField>

#getField()

根据名称获取 Collection 的字段

#签名

  • getField(name: string): IField