@wearesage/schema
Version:
A flexible schema definition and validation system for TypeScript with multi-database support
53 lines (44 loc) • 940 B
text/typescript
import "reflect-metadata";
import { Entity, Id, Property, OneToMany, ManyToOne } from "../..";
import { User } from "./User";
import { Post } from "./Post";
import { Reaction } from "./Reaction";
export class Comment {
id: string;
content: string;
createdAt: Date;
author: User;
post: Post;
replies: Comment[] = [];
parentComment: Comment;
reactions: Reaction[] = [];
}