adjustments to add team role and other better stuff

This commit is contained in:
Arjun Patel
2022-01-15 13:52:44 -08:00
parent 87fb480956
commit 74f8c40e45
6 changed files with 95 additions and 58 deletions
+31 -23
View File
@@ -1,33 +1,41 @@
import { documentId, Firestore, serverTimestamp, Timestamp } from "firebase/firestore";
import {
documentId,
Firestore,
serverTimestamp,
Timestamp,
} from "firebase/firestore";
import IFirestoreSerializable from "./firestoreSerializable";
export class User {
id: string;
emailAddress: string;
nickName: string;
firstName: string;
lastName: string;
avatarUrl: string;
userStatus: UserStatus
id: string;
emailAddress: string;
nickName: string;
firstName: string;
lastName: string;
avatarUrl: string;
userStatus: UserStatus;
createdDate: Timestamp;
lastUpdatedDate: Timestamp;
/**designer? dev? */
teamRole: string;
// serialize() {
// return {
// createdDate: Timestamp.fromDate(this.createdDate),
// lastUpdatedDate: Timestamp.fromDate(this.lastUpdatedDate)
// }
// }
createdDate: Timestamp;
lastUpdatedDate: Timestamp;
// deserialize(firestoreData: {}) {
// this.lastUpdatedDate = firestoreData.lastUpdatedDate.toDate()
// }
// 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"
online = "online",
offline = "offline",
inCall = "in call",
busy = "busy",
}