forked from map-of-pi/map-of-pi-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.ts
55 lines (49 loc) · 1.25 KB
/
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
export interface IUser {
pi_uid: string;
pi_username: string;
user_name: string;
}
export interface IUserSettings {
user_settings_id?: string | null;
user_name?: string;
email?: string;
phone_number?: string;
image?: string;
findme?: string;
trust_meter_rating: number;
search_map_center?: {
type: 'Point';
coordinates: [number, number];
};
}
export interface ISeller {
seller_id: string;
name: string;
description: string;
seller_type: string;
image: string;
address: string;
average_rating: {
$numberDecimal: string;
};
sell_map_center: {
type: 'Point';
coordinates: [number, number];
};
coordinates: [number, number];
order_online_enabled_pref: boolean;
}
export interface IReviewFeedback {
_id: string;
review_receiver_id: string;
review_giver_id: string;
reply_to_review_id: string | null;
rating: number;
comment: string;
image: string;
review_date: string;
}
// Select specific fields from IUserSettings
export type PartialUserSettings = Pick<IUserSettings, 'user_name' | 'email' | 'phone_number' | 'findme' | 'trust_meter_rating'>;
// Combined interface representing a seller with selected user settings
export interface ISellerWithSettings extends ISeller, PartialUserSettings {}