From d222fdf4c43980569323c9d50371c2d9be6b03b0 Mon Sep 17 00:00:00 2001 From: kj1352 Date: Thu, 28 Oct 2021 19:05:16 +0530 Subject: [PATCH] Added mobile structure --- models/category.ts | 2 +- models/shelf.ts | 4 ++++ models/user.ts | 12 +++++++++++- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/models/category.ts b/models/category.ts index 964aca6..e7fcd72 100644 --- a/models/category.ts +++ b/models/category.ts @@ -11,6 +11,6 @@ export interface MongoCategory extends Omit { shelves?: Array, // Shelf IDs } -export interface MobileCategory extends MongoCategory { +export interface MobileCategory extends Category { _id: string, } \ No newline at end of file diff --git a/models/shelf.ts b/models/shelf.ts index 6522dcc..887ef17 100644 --- a/models/shelf.ts +++ b/models/shelf.ts @@ -24,3 +24,7 @@ export interface MongoShelfWord extends Omit { export interface MongoShelf extends Omit { words?: Array } + +export interface MobileShelf extends Shelf { + _id: string, +} \ No newline at end of file diff --git a/models/user.ts b/models/user.ts index 8884e62..e9f86f7 100644 --- a/models/user.ts +++ b/models/user.ts @@ -1,4 +1,4 @@ -import { Category } from "./category"; +import { Category, MobileCategory } from "./category"; import { Word } from "./word"; export interface User { @@ -15,4 +15,14 @@ export interface User { export interface MongoUser extends Omit { categories?: Array // Category IDs, favouriteWords?: Array // Favourite Words ID +} + + +export interface MobileUser { + _id: string, + name: string, + email: string, + isVerified: boolean, + categories: Array, + favouriteWords?: Array, } \ No newline at end of file