adding bunch of stuff for user getting
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
export default interface IFirestoreSerializable {
|
||||
id: string;
|
||||
|
||||
serialize: () => {};
|
||||
|
||||
// deserialize: (firestoreData: {}) => {};
|
||||
}
|
||||
+20
-2
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user