AbimongoModelOptions
@abimongo/core / AbimongoModelOptions
Interface: AbimongoModelOptions<T>
Defined in: core/src/types/abimongo.mode.type.ts:9
Options for configuring an Abimongo model.
Type Parameters
T
T extends Document = any
The type of the document in the model.
Properties
client?
optionalclient:MongoClient
Defined in: core/src/types/abimongo.mode.type.ts:18
The MongoClient instance to use.
collection?
optionalcollection:Collection<T>
Defined in: core/src/types/abimongo.mode.type.ts:38
The MongoDB collection instance.
collectionName
collectionName:
string
Defined in: core/src/types/abimongo.mode.type.ts:28
The name of the collection.
db?
optionaldb:Db
Defined in: core/src/types/abimongo.mode.type.ts:13
The database instance to use.
gcConfig?
optionalgcConfig:object
Defined in: core/src/types/abimongo.mode.type.ts:42
The TTL (Time To Live) index configuration for garbage collection.
createdAtField?
optionalcreatedAtField:string
enableGC?
optionalenableGC:boolean
Whether to enable garbage collection for this model.
field?
optionalfield:string
The field to use for garbage collection.
indexName?
optionalindexName:string
ttl
ttl:
number
updatedAtField?
optionalupdatedAtField:string
schema?
optionalschema:AbimongoSchema<T>
Defined in: core/src/types/abimongo.mode.type.ts:33
The schema definition for the model.
tenantId?
optionaltenantId:string
Defined in: core/src/types/abimongo.mode.type.ts:23
The tenant ID for multi-tenancy.