| 38 | } |
| 39 | |
| 40 | @Entity() |
| 41 | class Post { |
| 42 | @PrimaryKey() |
| 43 | id!: number; |
| 44 | |
| 45 | @Property() |
| 46 | title!: string; |
| 47 | |
| 48 | @Property() |
| 49 | createdAt!: Date; |
| 50 | |
| 51 | @ManyToOne(() => User) |
| 52 | user!: Ref<User>; |
| 53 | |
| 54 | @OneToMany(() => Comment, c => c.post) |
| 55 | comments = new Collection<Comment>(this); |
| 56 | |
| 57 | @ManyToMany(() => Tag) |
| 58 | tags = new Collection<Tag>(this); |
| 59 | } |
| 60 | |
| 61 | @Entity() |
| 62 | class User { |
nothing calls this directly
no test coverage detected