|
4 | 4 | * Created Date: 2025-09-08 15:45:56 |
5 | 5 | * Author: 3urobeat |
6 | 6 | * |
7 | | - * Last Modified: 2026-04-01 19:04:46 |
| 7 | + * Last Modified: 2026-05-04 22:52:22 |
8 | 8 | * Modified By: 3urobeat |
9 | 9 | * |
10 | 10 | * Copyright (c) 2025 - 2026 3urobeat <https://github.com/3urobeat> |
|
15 | 15 | */ |
16 | 16 |
|
17 | 17 |
|
18 | | -import type { Implements } from "./Implements"; |
| 18 | +import type { DatabaseItem } from "./storage"; |
19 | 19 |
|
20 | 20 |
|
21 | 21 | // Base type for Clothing & Outfit, used by generic components & composables. |
22 | | -export type Item = { |
23 | | - id: string, |
24 | | - title: string, // Used for sorting |
25 | | - labelIDs: string[], // Label[], // Used as filters/for filtering |
26 | | - addedTimestamp: number, // Used for sorting |
27 | | - modifiedTimestamp: number |
| 22 | +export interface WardrobeItem extends DatabaseItem { |
| 23 | + title: string, // Used for sorting |
| 24 | + labelIDs: string[], // Used as filters/for filtering |
28 | 25 | } |
29 | 26 |
|
30 | 27 |
|
31 | | -// Implements Item |
32 | | -export type Clothing = Implements<Item, { |
| 28 | +// Implements WardrobeItem |
| 29 | +export interface Clothing extends WardrobeItem { |
33 | 30 | id: string, |
34 | 31 | title: string, |
35 | 32 | description: string, |
36 | 33 | imgPath: string, |
37 | | - labelIDs: string[], // IMPORTANT: May reference non-existent labels if dataCleanUp job did not run yet! |
38 | | - addedTimestamp: number, |
39 | | - modifiedTimestamp: number |
40 | | -}> |
| 34 | + labelIDs: string[] // IMPORTANT: May reference non-existent labels if dataCleanUp job did not run yet! |
| 35 | +} |
41 | 36 |
|
42 | 37 |
|
43 | | -// Implements Item |
44 | | -export type Outfit = Implements<Item, { |
45 | | - id: string, |
| 38 | +// Implements WardrobeItem |
| 39 | +export interface Outfit extends WardrobeItem { |
46 | 40 | title: string, |
47 | 41 | clothes: { order: number, clothingID: string }[], // IMPORTANT: May reference non-existent clothes if dataCleanUp job did not run yet! |
48 | 42 | labelIDs: string[], // IMPORTANT: May reference non-existent labels if dataCleanUp job did not run yet! |
49 | | - previewImgPath: string, |
50 | | - addedTimestamp: number, |
51 | | - modifiedTimestamp: number |
52 | | -}> |
| 43 | + previewImgPath: string |
| 44 | +} |
0 commit comments