fix(medusa): Add usage_count + usage_limit to discount

This commit is contained in:
olivermrbl
2021-03-17 08:42:14 +01:00
parent 90787be914
commit c513813bb6
14 changed files with 1859 additions and 1177 deletions
+6 -1
View File
@@ -7,7 +7,6 @@ import {
Index,
Column,
PrimaryColumn,
OneToOne,
ManyToMany,
JoinTable,
} from "typeorm"
@@ -67,6 +66,9 @@ export class DiscountRule {
@Column({ nullable: true })
usage_limit: number
@Column({ nullable: true })
usage_count: number
@CreateDateColumn({ type: "timestamptz" })
created_at: Date
@@ -122,6 +124,9 @@ export class DiscountRule {
* usage_limit:
* description: "The maximum number of times that a discount can be used."
* type: integer
* usage_count:
* description: "The number of times a discount has been used."
* type: integer
* created_at:
* description: "The date with timezone at which the resource was created."
* type: string