medusa-plugin-reviews
Version:
Customer product reviews plugin for medusa.
80 lines (69 loc) • 1.93 kB
text/typescript
import {
Column,
CreateDateColumn,
Entity,
Index,
JoinColumn,
ManyToOne,
PrimaryColumn,
UpdateDateColumn,
} from "typeorm"
import { Product } from "@medusajs/medusa"
export class ProductReview {
id: number
product_id: string
product: Product
rating: number
body: string
email: string
name: string
created_at: Date
updated_at: Date
}
/**
* @schema product_review
* title: "Product Reviews"
* description: "Product reviews represent a review made by a customer for a specific
* product."
* x-resourceId: product_review
* properties:
* id:
* description: "The id of the Product Review. This value will be prefixed with
* `prev_`."
* type: string
* product_id:
* description: "The id of the Product that the Review is related to."
* type: string
* rating:
* description: "The rating value of customer that has given a review (1 - 5)."
* type: integer
* body:
* description: "The rating body text of customer that has given a review."
* type: string
* email:
* description: "The email of customer that has given a review."
* type: string
* name:
* description: "The name of customer that has given a review."
* type: string
* created_at:
* description: "The date with timezone at which the resource was created."
* type: string
* format: date-time
* updated_at:
* description: "The date with timezone at which the resource was last updated."
* type: string
* format: date-time
*/