implemented file upload for attachments

This commit is contained in:
2024-06-11 02:23:22 +02:00
parent e841ba8938
commit 86eb422dd5
23 changed files with 332 additions and 147 deletions
+5
View File
@@ -5,6 +5,7 @@ import { Attribute, AutoIncrement, BelongsTo, BelongsToMany, CreatedAt, Default,
import { Tag } from "./Tag";
import { PostTag } from "./PostTag";
import { Project } from "./Project";
import { Attachment } from "./Attachment";
export class Post extends Model<InferAttributes<Post>, InferCreationAttributes<Post>> {
@@ -45,6 +46,10 @@ export class Post extends Model<InferAttributes<Post>, InferCreationAttributes<P
@BelongsToMany(()=>Tag, { through: { model: ()=>PostTag, unique: false}, inverse: {as: 'taggedPosts'} })
declare postTags?:NonAttribute<Tag[]>;
/** Defined by {@link Attachment.post} */
declare Attachments:NonAttribute<Attachment>[];
declare getUser: BelongsToGetAssociationMixin<User>;