adding bunch of stuff for user getting

This commit is contained in:
Arjun Patel
2022-01-13 22:33:05 -08:00
parent 9f5b3d072a
commit 4e4bc2bcc9
11 changed files with 2202 additions and 51 deletions
+7
View File
@@ -0,0 +1,7 @@
export default interface IFirestoreSerializable {
id: string;
serialize: () => {};
// deserialize: (firestoreData: {}) => {};
}
+20 -2
View File
@@ -1,12 +1,30 @@
import { documentId, Firestore, serverTimestamp, Timestamp } from "firebase/firestore";
import IFirestoreSerializable from "./firestoreSerializable";
export class User {
id: string;
nickname: string;
nickName: string;
firstName: string;
lastName: string;
createdDate: Date
lastUpdatedDate: Date
// serialize() {
// return {
// createdDate: Timestamp.fromDate(this.createdDate),
// lastUpdatedDate: Timestamp.fromDate(this.lastUpdatedDate)
// }
// }
// deserialize(firestoreData: {}) {
// this.lastUpdatedDate = firestoreData.lastUpdatedDate.toDate()
// }
}
export enum UserStatus {
online = "online",
offline = "offline",
inCall = "in call",
busy = "busy"
busy = "busy"
}