Fix resource import error (#1136)

* make audio/video speech association optional

* update package version
This commit is contained in:
an-lee
2024-10-18 18:19:34 +08:00
committed by GitHub
parent 2f2c4431c5
commit 61ad5cca57
3 changed files with 9 additions and 3 deletions

View File

@@ -3,7 +3,7 @@
"private": true,
"name": "enjoy",
"productName": "Enjoy",
"version": "0.6.0",
"version": "0.6.1-preview",
"description": "Enjoy desktop app",
"main": ".vite/build/main.js",
"types": "./src/types.d.ts",

View File

@@ -85,7 +85,10 @@ export class Audio extends Model<Audio> {
})
transcription: Transcription;
@BelongsTo(() => Speech, "md5")
@BelongsTo(() => Speech, {
foreignKey: "md5",
constraints: false,
})
speech: Speech;
@Default(0)

View File

@@ -85,7 +85,10 @@ export class Video extends Model<Video> {
})
transcription: Transcription;
@BelongsTo(() => Speech, "md5")
@BelongsTo(() => Speech, {
foreignKey: "md5",
constraints: false,
})
speech: Speech;
@Default(0)