chore: add service review add and get in service page and also approve and reject for admin
This commit is contained in:
@@ -2,6 +2,7 @@ import { Column, Entity, ManyToOne, OneToMany } from "typeorm";
|
||||
|
||||
import { DanakServiceCategory } from "./danak-service-category.entity";
|
||||
import { DanakServiceImage } from "./danak-service-image.entity";
|
||||
import { DanakServiceReview } from "./danak-service-review.entity";
|
||||
import { BaseEntity } from "../../../common/entities/base.entity";
|
||||
import { Ads } from "../../ads/entities/ads.entity";
|
||||
import { Announcement } from "../../announcements/entities/announcement.entity";
|
||||
@@ -11,7 +12,7 @@ import { ServicesLanguage } from "../enums/services-language.enum";
|
||||
|
||||
@Entity()
|
||||
export class DanakService extends BaseEntity {
|
||||
@Column({ type: "varchar", length: 100, nullable: false, unique: true })
|
||||
@Column({ type: "varchar", length: 150, nullable: false, unique: true })
|
||||
name: string;
|
||||
|
||||
@Column({ type: "varchar", length: 150, nullable: true })
|
||||
@@ -72,6 +73,9 @@ export class DanakService extends BaseEntity {
|
||||
@OneToMany(() => Ads, (ads) => ads.service)
|
||||
ads: Ads[];
|
||||
|
||||
@OneToMany(() => DanakServiceReview, (danakServiceReview) => danakServiceReview.service)
|
||||
reviews: DanakServiceReview[];
|
||||
|
||||
// @ManyToMany(() => Discount, (discount) => discount.services, { nullable: true })
|
||||
// discounts?: Discount[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user