chore: distinguish between database columns and relations
This commit is contained in:
parent
e143f0d7ac
commit
ee33337a3f
1 changed files with 10 additions and 9 deletions
|
@ -43,13 +43,6 @@ export class SwSubscription {
|
|||
})
|
||||
public sendReadMessage: boolean;
|
||||
|
||||
//#region Relations
|
||||
@ManyToOne(() => User, {
|
||||
onDelete: "CASCADE",
|
||||
})
|
||||
@JoinColumn()
|
||||
public user: Relation<User>;
|
||||
|
||||
/**
|
||||
* Type of subscription, used for Mastodon API notifications.
|
||||
* Empty for Misskey notifications.
|
||||
|
@ -71,10 +64,18 @@ export class SwSubscription {
|
|||
})
|
||||
public appAccessTokenId: AccessToken["id"] | null;
|
||||
|
||||
@ManyToOne((type) => AccessToken, {
|
||||
//#region Relations
|
||||
@ManyToOne(() => User, {
|
||||
onDelete: "CASCADE",
|
||||
})
|
||||
@JoinColumn()
|
||||
public appAccessToken: AccessToken | null;
|
||||
public user: Relation<User>;
|
||||
|
||||
@ManyToOne(() => AccessToken, {
|
||||
onDelete: "CASCADE",
|
||||
nullable: true,
|
||||
})
|
||||
@JoinColumn()
|
||||
public appAccessToken: Relation<AccessToken | null>;
|
||||
//#endregion
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue