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;
|
public sendReadMessage: boolean;
|
||||||
|
|
||||||
//#region Relations
|
|
||||||
@ManyToOne(() => User, {
|
|
||||||
onDelete: "CASCADE",
|
|
||||||
})
|
|
||||||
@JoinColumn()
|
|
||||||
public user: Relation<User>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of subscription, used for Mastodon API notifications.
|
* Type of subscription, used for Mastodon API notifications.
|
||||||
* Empty for Misskey notifications.
|
* Empty for Misskey notifications.
|
||||||
|
@ -71,10 +64,18 @@ export class SwSubscription {
|
||||||
})
|
})
|
||||||
public appAccessTokenId: AccessToken["id"] | null;
|
public appAccessTokenId: AccessToken["id"] | null;
|
||||||
|
|
||||||
@ManyToOne((type) => AccessToken, {
|
//#region Relations
|
||||||
|
@ManyToOne(() => User, {
|
||||||
onDelete: "CASCADE",
|
onDelete: "CASCADE",
|
||||||
})
|
})
|
||||||
@JoinColumn()
|
@JoinColumn()
|
||||||
public appAccessToken: AccessToken | null;
|
public user: Relation<User>;
|
||||||
|
|
||||||
|
@ManyToOne(() => AccessToken, {
|
||||||
|
onDelete: "CASCADE",
|
||||||
|
nullable: true,
|
||||||
|
})
|
||||||
|
@JoinColumn()
|
||||||
|
public appAccessToken: Relation<AccessToken | null>;
|
||||||
//#endregion
|
//#endregion
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue