Interface
Each model interface should contain types for all of the model attributes.
Default Attributes
These attributes are built-in and cannot be overriden.
_id(string) - the record id_createdAt(number) - when the record was created_deletedAt(number) - when the record was deleted_updatedAt(number) - when the record was updated
Default Interface
export interface IModel {
_id?: string;
_createdAt?: number;
_deletedAt?: number;
_updatedAt?: number;
}
Example
export interface IInstrumentModel extends IModel {
name: string;
type: string;
}
Updated almost 7 years ago