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;
}