oak-db/test/entities/House.ts

27 lines
718 B
TypeScript

import { String, Int, Datetime, Image, Boolean, Text, Float } from 'oak-domain/lib/types/DataType';
import { Schema as User } from './User';
import { Schema as Area } from './Area';
import { EntityDesc, EntityShape } from 'oak-domain/lib/types';
export interface Schema extends EntityShape {
district: String<16>;
area: Area;
owner: User;
size: Float<8, 4>;
data?: Object;
};
const entityDesc: EntityDesc<Schema> = {
locales: {
zh_CN: {
name: '房屋',
attr: {
district: '街区',
area: '地区',
owner: '房主',
size: '面积',
data: '数据',
},
},
}
};