-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhome.types.ts
115 lines (102 loc) · 2.05 KB
/
home.types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
import {
electronics_type,
unit_type,
pane,
position,
grass,
repair_location,
service_type,
mod_room,
} from './home.enum';
// types
export type photo = {
title: String;
location: String; // pointer to bucket location,
date: Date;
};
type project = {
date: Date;
cost_estimated: Number;
const_actual: Number;
receipt: receipt;
place: String; // reference the id location of the project,
photos: photo[];
};
type window = {
type: pane;
screen: Boolean;
photos: photo[];
};
type closet = {
doors: Number;
shelving: String;
photos: photo[];
};
export type unit = {
type: unit_type;
service_date: [Date];
service_interval: Number;
service_type: String;
id: String; // auto generated,
receipt: String; // Id of receipt stored in 'receipts'
};
export type receipt = {
title: String;
img: String; // location of image in bucket,
description: String;
id: String; // auto generated,
date: Date;
set_receipt: () => unit['receipt']; // setter to store the receipt and set the ID property
};
export type yard = {
position: position;
grass: grass;
plants: String;
project: project[];
photos: photo[];
plan: String // Document in bucket location
};
export type repair = {
location: repair_location;
description: String;
date: Date;
repair_interval: Number; // base days
photos: photo[];
};
export type electronics = {
name: String;
type: electronics_type;
website: String; //encrypted storage
username: String; //encrypted storage
password: String; //encrypted storage
install_date: Date;
repair_interval: Number; // base days
photos: photo[];
};
export type service = {
type: service_type;
date: Date;
photos: photo[];
location?: String; // id of room
repeat_interval: Number; // base days
color_information?: String;
receipt: receipt[];
};
export type room = {
id: String; // auto generated
modification?: {
type: mod_room;
date: Date;
receipt?: receipt;
notes?: String;
photos?: photo[];
};
windows?: window[];
closet?: closet[];
photos: photo[];
};
export type stock = {
name: String,
type: String,
quantity: Number
}