2021-06-24 19:16:48 +02:00
|
|
|
export interface Table {
|
2021-06-24 19:17:26 +02:00
|
|
|
_id: string
|
|
|
|
_rev?: string
|
|
|
|
type?: string
|
|
|
|
views?: {}
|
|
|
|
name?: string
|
|
|
|
primary?: string[]
|
2021-06-24 19:16:48 +02:00
|
|
|
schema: {
|
|
|
|
[key: string]: {
|
|
|
|
// TODO: replace with field types enum when done
|
2021-06-24 19:17:26 +02:00
|
|
|
type: string
|
|
|
|
fieldName?: string
|
|
|
|
name: string
|
2021-06-24 19:16:48 +02:00
|
|
|
constraints?: {
|
2021-06-24 19:17:26 +02:00
|
|
|
type?: string
|
|
|
|
email?: boolean
|
|
|
|
inclusion?: string[]
|
2021-06-24 19:16:48 +02:00
|
|
|
length?: {
|
2021-06-24 19:17:26 +02:00
|
|
|
minimum?: string | number
|
|
|
|
maximum?: string | number
|
|
|
|
}
|
|
|
|
presence?: boolean
|
|
|
|
}
|
2021-06-24 19:16:48 +02:00
|
|
|
}
|
2021-06-24 19:17:26 +02:00
|
|
|
}
|
|
|
|
primaryDisplay?: string
|
|
|
|
sourceId?: string
|
2021-06-24 19:16:48 +02:00
|
|
|
}
|