chore: add blog blog comment and blog category crud

This commit is contained in:
mahyargdz
2025-04-12 16:09:25 +03:30
parent 0bc001c66b
commit a9879732a3
23 changed files with 976 additions and 3 deletions
@@ -0,0 +1,25 @@
import { Column, DeleteDateColumn, Entity, OneToMany } from "typeorm";
import { Blog } from "./blog.entity";
import { BaseEntity } from "../../../common/entities/base.entity";
@Entity()
export class BlogCategory extends BaseEntity {
@Column({ type: "varchar", length: 100, unique: true })
title: string;
@Column({ type: "varchar", length: 255, nullable: true })
description: string;
@Column({ type: "varchar", length: 255, nullable: true })
iconUrl: string;
@Column({ type: "boolean", default: true })
isActive: boolean;
@OneToMany(() => Blog, (blog) => blog.category)
blogs: Blog[];
@DeleteDateColumn({ type: "timestamptz" })
deletedAt?: Date;
}