@wearesage/schema
Version:
A flexible schema definition and validation system for TypeScript with multi-database support
54 lines (43 loc) • 881 B
text/typescript
import "reflect-metadata";
import { Entity, Id, Property, ManyToOne, ManyToMany, OneToMany } from "../..";
import { User } from "./User";
import { Post } from "./Post";
export class Group {
id: string;
name: string;
description: string;
imageUrl: string;
isPrivate: boolean = false;
createdAt: Date;
owner: User;
members: User[] = [];
posts: Post[] = [];
events: Event[] = [];
}