feat: friend system + shared stores
This commit is contained in:
@ -9,6 +9,7 @@ import { type Review } from "./Review";
|
||||
import { type Saved } from "./Saved";
|
||||
import type { Hazard } from "./Hazard";
|
||||
import type { Store } from "./Stores";
|
||||
import type { Follow } from "./Follow";
|
||||
|
||||
@Entity()
|
||||
export class User extends BaseEntity {
|
||||
@ -33,6 +34,12 @@ export class User extends BaseEntity {
|
||||
@OneToMany("Hazard", (h: Hazard) => h.user)
|
||||
hazards: Hazard[];
|
||||
|
||||
@OneToMany("Follow", (f: Follow) => f.follower)
|
||||
following: Promise<Follow[]>;
|
||||
|
||||
@OneToMany("Follow", (f: Follow) => f.following)
|
||||
followers: Promise<Follow[]>;
|
||||
|
||||
@Column({
|
||||
default: () => "NOW()",
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user