feat: friend system + shared stores
Some checks failed
TrafficCue Server CI / check (push) Failing after 56s
TrafficCue Server CD / build (push) Successful in 2m5s

This commit is contained in:
2025-10-03 14:13:31 +02:00
parent aff447e741
commit c492e62d60
5 changed files with 247 additions and 7 deletions

View File

@ -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()",
})