admin panel progress

This commit is contained in:
2024-06-08 00:21:53 +02:00
parent a0a938021d
commit 99c3267c04
24 changed files with 305 additions and 103 deletions
+3 -3
View File
@@ -35,13 +35,13 @@ export class Post extends Model<InferAttributes<Post>, InferCreationAttributes<P
declare user_id:ForeignKey<User['id']>;
@Attribute(DataTypes.INTEGER)
declare project_id?:CreationOptional<ForeignKey<User['id']>>;
declare project_id:CreationOptional<ForeignKey<User['id']>>;
@BelongsTo(()=>User, { foreignKey: 'user_id', inverse: { type: 'hasMany', as: 'posts' } })
declare user:NonAttribute<User>;
@BelongsTo(()=>Project, { inverse: { type: 'hasMany', as: 'posts' } })
declare project:NonAttribute<User>;
@BelongsTo(()=>Project, { foreignKey:'project_id', inverse: { type: 'hasMany', as: 'posts' } })
declare project:CreationOptional<Project>;
@BelongsToMany(()=>Tag, { through: { model: ()=>PostTag, unique: false}, inverse: {as: 'taggedPosts'} })
declare postTags?:NonAttribute<Tag[]>;