Function: defineModelSchema()
Call Signature
defineModelSchema<
Schema>(definition):Constructor<MagicAttributes<Schema,Key>> &Constructor<Model> & typeofModel
Defined in: packages/soukai/src/models/schema.ts:9
Type Parameters
Schema
Schema extends Partial<{ fields: FieldsDefinition<unknown>; hooks?: ModelHooks; primaryKey: string; timestamps: TimestampsDefinition; }>
Parameters
definition
Schema
Returns
Constructor<MagicAttributes<Schema, Key>> & Constructor<Model> & typeof Model
Call Signature
defineModelSchema<
BaseModel,Schema>(baseModel,definition):Constructor<MagicAttributes<Schema,Key>> &Constructor<BaseModel> & typeofModel
Defined in: packages/soukai/src/models/schema.ts:12
Type Parameters
BaseModel
BaseModel extends Model
Schema
Schema extends Partial<{ fields: FieldsDefinition<unknown>; hooks?: ModelHooks; primaryKey: string; timestamps: TimestampsDefinition; }>
Parameters
baseModel
ModelConstructor<BaseModel>
definition
Schema
Returns
Constructor<MagicAttributes<Schema, Key>> & Constructor<BaseModel> & typeof Model