various changes

This commit is contained in:
2024-06-23 02:53:15 +02:00
parent 4da9a4f7be
commit cdfbadb805
7 changed files with 38 additions and 16 deletions
+2 -2
View File
@@ -52,12 +52,12 @@ export class Post extends Model<InferAttributes<Post>, InferCreationAttributes<P
declare postTags?:NonAttribute<Tag[]>;
@BelongsToMany(()=>Bucket,{through: {model:'PostBucket'}, throughAssociations: {
@BelongsToMany(()=>Bucket,{through: {model:'PostBucket'}, foreignKeyConstraints: false, throughAssociations: {
fromSource: 'postBucketBuckets',
toSource: 'post',
fromTarget: 'postBucketPosts',
toTarget: 'PostBucket',
}, inverse:{as: 'posts'}, foreignKey: 'postId', otherKey: 'bucketId'})
}, inverse:{as: 'posts'}, foreignKey: {name: 'postId', unique: false}, otherKey: 'bucketId', })
declare buckets?:NonAttribute<Bucket[]>;