feat: initial work on stores
Some checks failed
TrafficCue Server CI / check (push) Failing after 27s
TrafficCue Server CD / build (push) Successful in 1m40s

This commit is contained in:
2025-09-22 20:14:32 +02:00
parent a2f30118ef
commit ef3debcdb3
8 changed files with 283 additions and 4 deletions

View File

@ -8,6 +8,7 @@ import {
import { type Review } from "./Review";
import { type Saved } from "./Saved";
import type { Hazard } from "./Hazard";
import type { Store } from "./Stores";
@Entity()
export class User extends BaseEntity {
@ -20,9 +21,15 @@ export class User extends BaseEntity {
@OneToMany("Review", (r: Review) => r.user)
reviews: Review[];
/**
* @deprecated Use stores instead
*/
@OneToMany("Saved", (s: Saved) => s.user)
saved: Saved[];
@OneToMany("Store", (s: Store) => s.user)
stores: Store[];
@OneToMany("Hazard", (h: Hazard) => h.user)
hazards: Hazard[];