39 lines
1.0 KiB
TypeScript
39 lines
1.0 KiB
TypeScript
import { ObjectId } from "mongodb";
|
|
|
|
export class Line {
|
|
constructor(
|
|
public createdByUserId: ObjectId,
|
|
public name?: string,
|
|
public createdDate: Date = new Date(),
|
|
public lastUpdatedDate: Date = new Date(),
|
|
public _id?: ObjectId
|
|
) {}
|
|
}
|
|
|
|
export class LineMember {
|
|
// the last time that the user visited the line
|
|
// for new activity monitoring
|
|
lastVisitDate?: Date;
|
|
|
|
constructor(
|
|
// unique constraint
|
|
public lineId: ObjectId,
|
|
public userId: ObjectId,
|
|
|
|
public state: LineMemberState,
|
|
|
|
public createdDate: Date = new Date(),
|
|
public _id?: ObjectId
|
|
) {}
|
|
}
|
|
|
|
export enum LineMemberState {
|
|
// these states will be for later when we want an inbox and such
|
|
// INVITED = "INVITED", // user gets this in their request inbox
|
|
|
|
// ARCHIVED = "ARCHIVED", // user no longer wants anything to do with convo
|
|
|
|
INBOX = "INBOX", // user decided to join this conversation after being invited...for now things just land in inbox anyway
|
|
TUNED = "TUNED", // user upgraded priority of this and now is toggle tuned in live to convo
|
|
}
|