UNPKG

octonom

Version:

Object Document Mapper for any database

16 lines (11 loc) 428 B
import { Model, Property, Schema, utils } from '../../../lib/main'; import { PersonModel } from './person'; export class GroupWithArrayModel extends Model { @Property.String({default: utils.generateId}) public id: string; @Property.Array({elementSchema: new Schema.Model({model: PersonModel})}) public members: Array<Partial<PersonModel>>; constructor(data?: Partial<GroupWithArrayModel>) { super(data); } }