| 18 | } |
| 19 | |
| 20 | @Entity() |
| 21 | class User { |
| 22 | @PrimaryKey() |
| 23 | id!: number; |
| 24 | |
| 25 | @Property() |
| 26 | name!: string; |
| 27 | |
| 28 | @ManyToMany({ |
| 29 | entity: () => Role, |
| 30 | pivotEntity: () => UserRole, |
| 31 | }) |
| 32 | roles = new Collection<Role>(this); |
| 33 | |
| 34 | @ManyToOne(() => School, { nullable: true }) |
| 35 | school?: School; |
| 36 | } |
| 37 | |
| 38 | @Entity() |
| 39 | class Role { |
nothing calls this directly
no test coverage detected