From 2824500b1bc9a688e256e194a5910bd4057a2434 Mon Sep 17 00:00:00 2001 From: "S. Amir Mohammad Najafi" Date: Thu, 5 Jan 2023 15:55:23 +0330 Subject: [PATCH] feat(type): order storage --- core/type/src/order.ts | 8 +------- core/type/src/user.ts | 11 +++++------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/core/type/src/order.ts b/core/type/src/order.ts index 9b8405846..2ab4ad31a 100644 --- a/core/type/src/order.ts +++ b/core/type/src/order.ts @@ -1,14 +1,8 @@ import type {AlwatrDocumentObject} from './storage.js'; -import type {User} from './user.js'; export type Order = AlwatrDocumentObject & { - user: User; - detail: OrderDetail; - itemList: Array; -}; - -export type OrderDetail = { description: string; + itemList: Array; }; export type Product = AlwatrDocumentObject & { diff --git a/core/type/src/user.ts b/core/type/src/user.ts index 4db1785c0..9c8b763d9 100644 --- a/core/type/src/user.ts +++ b/core/type/src/user.ts @@ -1,7 +1,6 @@ -export type User = { - id: string; - identity: { - phoneNumber: string; - email?: string; - }; +import type {AlwatrDocumentObject} from './storage.js'; + +export type User = AlwatrDocumentObject & { + name: string; + phoneNumber: string; };