types
Look at Single Table Inheritance for more detail
Usage
class Person extends Model {
static entity = 'person'
static types () {
return {
PERSON: Person,
ADULT: Adult
}
}
static fields () {
return {
id: this.attr(null),
name: this.attr('')
}
}
}
Typescript Declarations
export interface InheritanceTypes {
[key: string]: typeof Model
}
function $types(): InheritanceTypes
Table of Contents