@wearesage/schema
Version:
A flexible schema definition and validation system for TypeScript with multi-database support
60 lines (49 loc) • 1.06 kB
text/typescript
import "reflect-metadata";
import { Entity, Id, Property, OneToMany, ManyToOne, ManyToMany } from "../..";
import { User } from "./User";
import { Reaction } from "./Reaction";
import { Hashtag } from "./Hashtag";
import { Group } from "./Group";
export class Post {
id: string;
content: string;
imageUrl: string;
createdAt: Date;
isPublic: boolean = true;
author: User;
comments: Comment[] = [];
reactions: Reaction[] = [];
hashtags: Hashtag[] = [];
group: Group;
}