chore: add update and delete for services and category and ads
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Column, Entity, ManyToOne, OneToMany } from "typeorm";
|
||||
import { Column, DeleteDateColumn, Entity, ManyToOne, OneToMany } from "typeorm";
|
||||
|
||||
import { DanakServiceCategory } from "./danak-service-category.entity";
|
||||
import { DanakServiceImage } from "./danak-service-image.entity";
|
||||
@@ -51,12 +51,6 @@ export class DanakService extends BaseEntity {
|
||||
@Column({ type: "varchar", length: 255, nullable: false })
|
||||
icon: string;
|
||||
|
||||
// @Column({ type: "int", nullable: false })
|
||||
// count: number;
|
||||
|
||||
// @Column({ type: "float", nullable: false })
|
||||
// averageRating: number;
|
||||
|
||||
//-------------------------------------
|
||||
@ManyToOne(() => DanakServiceCategory, (danakServiceCategory) => danakServiceCategory.danakServices, {
|
||||
nullable: false,
|
||||
@@ -81,4 +75,7 @@ export class DanakService extends BaseEntity {
|
||||
|
||||
@OneToMany(() => DanakServiceReview, (danakServiceReview) => danakServiceReview.service)
|
||||
reviews: DanakServiceReview[];
|
||||
|
||||
@DeleteDateColumn()
|
||||
deletedAt?: Date;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user