import { Constraint } from '../bson/constraint'; import { DICTIONARY, KnownRecord, RECORD } from "../record"; import { Reference } from '../reference'; import { STRING } from "../string"; import { FieldMap, TypeOf } from './field/field'; export type ModelReference = Reference; export interface Model { area: string; name: string; hint: string; fields: FieldMap; rules: Constraint; } export type NamedArgsOf = { [P in keyof T]: TypeOf; }; export const model: Model = { area: "data", name: "Model", hint: "Object type descriptor", fields: { area: { type: STRING }, name: { type: STRING }, hint: { type: STRING }, fields: { type: [RECORD, DICTIONARY] }, rules: { type: [RECORD, DICTIONARY] }, }, rules: {}, };