adding initial models but mostly boilerplate for the entire implementation
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { v4 as uuid } from "uuid";
|
||||
import { Timestamp } from "firebase/firestore";
|
||||
|
||||
export default class UserConversation {
|
||||
id: string = uuid();
|
||||
|
||||
userId: string;
|
||||
conversationId: string;
|
||||
state: UserConversationState;
|
||||
|
||||
createdDate: Timestamp = Timestamp.now();
|
||||
lastUpdatedDate?: Timestamp;
|
||||
|
||||
constructor(
|
||||
_userId: string,
|
||||
_conversationId: string,
|
||||
_state: UserConversationState
|
||||
) {
|
||||
this.userId = _userId;
|
||||
this.conversationId = _conversationId;
|
||||
this.state = _state;
|
||||
}
|
||||
}
|
||||
|
||||
export enum UserConversationState {
|
||||
default = "default",
|
||||
priority = "priority",
|
||||
later = "later",
|
||||
done = "done",
|
||||
// blocked = "blocked"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user