export class FieldType {
    constructor(
        public name: string,
    ) { }
}

export class Field {
    constructor(
        public name: string,
        public type: FieldType,
    ) { }
}

export class Relation {
    constructor(
        public target: Model,
        public targetField: Field,
    ) { }
}

export class Model {
    constructor(
        public pkField: string,
        public fields: {[name: string]: Field},
        public relations: {[key: string]: Relation},
    ) { }
}

export class Instance {
    constructor(
        public model: Model,
        public pk: any,
        public data: {[name: string]: any},
    ) { }
}
