implemented file upload for attachments
This commit is contained in:
@@ -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>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user