ソースを参照

Added mobile structure

master
kj1352 4年前
コミット
d222fdf4c4
3個のファイルの変更16行の追加2行の削除
  1. +1
    -1
      models/category.ts
  2. +4
    -0
      models/shelf.ts
  3. +11
    -1
      models/user.ts

+ 1
- 1
models/category.ts ファイルの表示

@@ -11,6 +11,6 @@ export interface MongoCategory extends Omit<Category, 'shelves'> {
shelves?: Array<string>, // Shelf IDs
}

export interface MobileCategory extends MongoCategory {
export interface MobileCategory extends Category {
_id: string,
}

+ 4
- 0
models/shelf.ts ファイルの表示

@@ -24,3 +24,7 @@ export interface MongoShelfWord extends Omit<ShelfWord, "word"> {
export interface MongoShelf extends Omit<Shelf, "words"> {
words?: Array<MongoShelfWord>
}

export interface MobileShelf extends Shelf {
_id: string,
}

+ 11
- 1
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<User, "categories" | "favouriteWords"> {
categories?: Array<string> // Category IDs,
favouriteWords?: Array<string> // Favourite Words ID
}


export interface MobileUser {
_id: string,
name: string,
email: string,
isVerified: boolean,
categories: Array<MobileCategory>,
favouriteWords?: Array<Word>,
}

読み込み中…
キャンセル
保存