adding more logic for creating a conversation
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
import { FieldValue, serverTimestamp, Timestamp } from 'firebase/firestore';
|
||||
export default class Conversation {
|
||||
constructor(
|
||||
public id: string,
|
||||
public name: string,
|
||||
id: string;
|
||||
|
||||
constructor(
|
||||
public createdByUserId: string,
|
||||
|
||||
public membersList: string[],
|
||||
|
||||
public name?: string,
|
||||
|
||||
public lastUpdatedDate = Timestamp.now(),
|
||||
|
||||
public createdDate = Timestamp.now(),
|
||||
@@ -14,11 +17,11 @@ export default class Conversation {
|
||||
) {}
|
||||
}
|
||||
|
||||
export class Member {
|
||||
constructor(
|
||||
public id: string,
|
||||
public userId: string,
|
||||
public role: 'admin' | 'regular',
|
||||
public joinedDate = Timestamp.now(),
|
||||
) {}
|
||||
}
|
||||
// export class Member {
|
||||
// constructor(
|
||||
// public id: string,
|
||||
// public userId: string,
|
||||
// public role: 'admin' | 'regular',
|
||||
// public joinedDate = Timestamp.now(),
|
||||
// ) {}
|
||||
// }
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Timestamp } from 'firebase/firestore';
|
||||
|
||||
export class User {
|
||||
id: string;
|
||||
lastUpdatedDate?: Timestamp;
|
||||
|
||||
constructor(
|
||||
|
||||
Reference in New Issue
Block a user