This commit is contained in:
olivermrbl
2021-03-11 13:40:20 +01:00
parent 83a7d7ec5a
commit 641c1df14a
9 changed files with 334 additions and 11 deletions
+44 -11
View File
@@ -9,22 +9,11 @@ import {
PrimaryColumn,
OneToOne,
JoinColumn,
ManyToOne,
JoinTable,
ManyToMany,
OneToMany,
} from "typeorm"
import { ulid } from "ulid"
import { Address } from "./address"
import { Cart } from "./cart"
import { Customer } from "./customer"
import { Discount } from "./discount"
import { LineItem } from "./line-item"
import { Order } from "./order"
import { Payment } from "./payment"
import { Region } from "./region"
import { ShippingMethod } from "./shipping-method"
enum DraftOrderStatus {
OPEN = "open",
@@ -83,3 +72,47 @@ export class DraftOrder {
this.id = `dorder_${id}`
}
}
/**
* @schema draft-order
* title: "DraftOrder"
* description: "Represents a draft order"
* x-resourceId: draft-order
* properties:
* id:
* type: string
* status:
* type: string
* enum:
* - open
* - awaiting
* - completed
* display_id:
* type: string
* cart_id:
* type: string
* cart:
* anyOf:
* - $ref: "#/components/schemas/cart"
* order_id:
* type: string
* order:
* anyOf:
* - $ref: "#/components/schemas/order"
* canceled_at:
* type: string
* format: date-time
* created_at:
* type: string
* format: date-time
* update_at:
* type: string
* format: date-time
* deleted_at:
* type: string
* format: date-time
* metadata:
* type: object
* idempotency_key:
* type: string
*/