chore (backend): wrap relations in TypeORM Relation<...>
This commit is contained in:
parent
3ceaf99df6
commit
5daeaf1de2
1 changed files with 4 additions and 2 deletions
|
@ -5,6 +5,7 @@ import {
|
||||||
ManyToOne,
|
ManyToOne,
|
||||||
PrimaryColumn,
|
PrimaryColumn,
|
||||||
Index,
|
Index,
|
||||||
|
type Relation,
|
||||||
} from "typeorm";
|
} from "typeorm";
|
||||||
import { Note } from "./note.js";
|
import { Note } from "./note.js";
|
||||||
import { id } from "../id.js";
|
import { id } from "../id.js";
|
||||||
|
@ -34,11 +35,12 @@ export class ScheduledNoteCreation {
|
||||||
onDelete: "CASCADE",
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public note: Note;
|
public note: Relation<Note>;
|
||||||
|
|
||||||
@ManyToOne(() => User, {
|
@ManyToOne(() => User, {
|
||||||
onDelete: "CASCADE",
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public user: User;
|
public user: Relation<User>;
|
||||||
//#endregion
|
//#endregion
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue