refactor: controllers and models to adapt them to the previous version of my-links

This commit is contained in:
Sonny
2024-05-24 23:54:43 +02:00
committed by Sonny
parent 31b4f22772
commit b28499a69a
19 changed files with 113 additions and 85 deletions

View File

@@ -9,7 +9,7 @@ export default class Link extends AppBaseModel {
declare name: string;
@column()
declare description: string;
declare description: string | null;
@column()
declare url: string;
@@ -18,13 +18,13 @@ export default class Link extends AppBaseModel {
declare favorite: boolean;
@column()
declare collectionId: string;
declare collectionId: number;
@belongsTo(() => Collection, { foreignKey: 'collectionId' })
declare collection: BelongsTo<typeof Collection>;
@column()
declare authorId: string;
declare authorId: number;
@belongsTo(() => User, { foreignKey: 'authorId' })
declare author: BelongsTo<typeof User>;