@wearesage/schema
Version:
A flexible schema definition and validation system for TypeScript with multi-database support
23 lines (18 loc) • 397 B
text/typescript
import "reflect-metadata";
import { Entity, Id, Property, ManyToMany } from "../..";
import { Post } from "./Post";
()
export class Hashtag {
()
id: string;
({ required: true, unique: true })
name: string;
()
trendingScore: number = 0;
({
target: () => Post,
inverse: "hashtags",
name: "TAGGED_IN",
})
posts: Post[] = [];
}