adding in proper creation of user
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { ObjectId } from "mongodb";
|
||||
|
||||
// some sort of contact or friend model
|
||||
|
||||
export default class Relationship {
|
||||
constructor(
|
||||
public senderUserId: string,
|
||||
public receiverUserId: string,
|
||||
public state: RelationshipState,
|
||||
public createdDate: Date = new Date(),
|
||||
public lastUpdatedDate: Date = new Date(),
|
||||
|
||||
public _id: ObjectId = new ObjectId()
|
||||
) {}
|
||||
}
|
||||
|
||||
export enum RelationshipState {
|
||||
PENDING = "PENDING",
|
||||
ACTIVE = "ACTIVE",
|
||||
BLOCKED = "BLOCKED",
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import { ObjectId } from "mongodb";
|
||||
|
||||
export class User {
|
||||
constructor(
|
||||
public googleId: string, // our Google id that every google user has unique that we are going to use for now
|
||||
public email: string,
|
||||
public verifiedEmail: boolean,
|
||||
public name: string,
|
||||
@@ -9,6 +10,18 @@ export class User {
|
||||
public family_name: string,
|
||||
public picture: string,
|
||||
public locale: string,
|
||||
public _id?: ObjectId // additional properties specific to our users collection
|
||||
|
||||
// additional properties specific to our users collection
|
||||
|
||||
public createdDate: Date,
|
||||
public status: UserStatus,
|
||||
public lastUpdatedDate?: Date,
|
||||
public _id?: ObjectId
|
||||
) {}
|
||||
}
|
||||
|
||||
export enum UserStatus {
|
||||
ONLINE = "ONLINE",
|
||||
OFFLINE = "OFFLINE",
|
||||
FLOW_STATE = "FLOW_STATE",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user