cleaning, prolly broke a lot but whatever
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
import { Timestamp } from "firebase/firestore";
|
||||
|
||||
export default class Announcement {
|
||||
id: string;
|
||||
teamId: string;
|
||||
audioDataUrl: string; // link to cloud storage file
|
||||
|
||||
state: AnnouncementState = AnnouncementState.active;
|
||||
|
||||
createdByUserId: string;
|
||||
createdDate: Timestamp;
|
||||
lastUpdatedDate: Timestamp;
|
||||
|
||||
constructor(_audioUrl: string, _teamId: string, _createdByUserId: string) {
|
||||
this.audioDataUrl = _audioUrl;
|
||||
this.createdByUserId = _createdByUserId;
|
||||
this.teamId = _teamId;
|
||||
}
|
||||
}
|
||||
|
||||
export enum AnnouncementState {
|
||||
active = "active",
|
||||
resolved = "resolved",
|
||||
deleted = "deleted",
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
import { Timestamp } from "firebase/firestore";
|
||||
|
||||
export default class Link {
|
||||
id: string;
|
||||
name: string;
|
||||
description: string;
|
||||
link: string; //url for file
|
||||
|
||||
state: LinkState = LinkState.active;
|
||||
type: LinkType;
|
||||
|
||||
teamId: string;
|
||||
// if it's not a teamAttachment, then have a list of members who it's for
|
||||
recipients: string[]; // userIds
|
||||
|
||||
createdByUserId: string;
|
||||
createdDate: Timestamp;
|
||||
|
||||
constructor(
|
||||
_name: string,
|
||||
_description: string,
|
||||
_link: string,
|
||||
_teamId: string,
|
||||
recipientsArr: string[],
|
||||
_createdByUserId: string
|
||||
) {
|
||||
this.name = _name;
|
||||
this.description = _description;
|
||||
this.link = _link;
|
||||
this.teamId = _teamId;
|
||||
this.recipients = recipientsArr;
|
||||
this.createdByUserId = _createdByUserId;
|
||||
|
||||
if (!recipientsArr || recipientsArr?.length == 0) {
|
||||
this.recipients = null;
|
||||
} else {
|
||||
this.recipients = recipientsArr;
|
||||
}
|
||||
|
||||
this.type = Link.getLinkType(_link);
|
||||
}
|
||||
|
||||
static getLinkType(url: string): LinkType {
|
||||
if (url.includes(LinkType.github)) {
|
||||
return LinkType.github;
|
||||
} else if (url.includes(LinkType.atlassian)) {
|
||||
return LinkType.atlassian;
|
||||
} else if (
|
||||
url.includes(LinkType.googleDrive) ||
|
||||
url.includes("docs.google")
|
||||
) {
|
||||
return LinkType.googleDrive;
|
||||
} else if (
|
||||
url.includes(".png") ||
|
||||
url.includes(".jpg") ||
|
||||
url.includes(".svg") ||
|
||||
url.includes(".gif") ||
|
||||
url.includes(LinkType.pastePics)
|
||||
) {
|
||||
return LinkType.image;
|
||||
} else if (url.includes(LinkType.pdf)) {
|
||||
return LinkType.pdf;
|
||||
} else if (url.includes(LinkType.codePile)) {
|
||||
return LinkType.codePile;
|
||||
} else {
|
||||
return LinkType.default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export enum LinkState {
|
||||
active = "active",
|
||||
archived = "archived",
|
||||
deleted = "deleted",
|
||||
}
|
||||
|
||||
export enum LinkType {
|
||||
default = "default",
|
||||
github = "github",
|
||||
atlassian = "atlassian",
|
||||
googleDrive = "drive.google",
|
||||
onedrive = "onedrive",
|
||||
image = "image",
|
||||
pdf = "pdf",
|
||||
codePile = "codepile",
|
||||
pastePics = "paste.pics",
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
import { Timestamp } from "firebase/firestore";
|
||||
|
||||
export class Message {
|
||||
id: string;
|
||||
audioDataUrl: string;
|
||||
|
||||
senderUserId: string;
|
||||
receiverUserId: string;
|
||||
|
||||
senderReceiver: string[]; // composite to make querying easier in the future
|
||||
|
||||
createdDate: Timestamp;
|
||||
|
||||
// firstListenDate: Timestamp;
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
import { Timestamp } from "firebase/firestore";
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
export default class OfficeRoom {
|
||||
id: string = uuidv4();
|
||||
|
||||
teamId: string;
|
||||
|
||||
name: string; // entrance, kitchen, etc.
|
||||
|
||||
createdDate: Timestamp;
|
||||
createdByUserId: string;
|
||||
|
||||
lastUpdatedDate: Timestamp;
|
||||
|
||||
members: string[] = []; // id's of users in the office room
|
||||
|
||||
state: OfficeRoomState;
|
||||
|
||||
constructor(
|
||||
_name: string,
|
||||
_teamId: string,
|
||||
_createdBy: string,
|
||||
_state: OfficeRoomState = OfficeRoomState.idle
|
||||
) {
|
||||
this.name = _name;
|
||||
this.teamId = _teamId;
|
||||
this.createdByUserId = _createdBy;
|
||||
this.state = _state;
|
||||
}
|
||||
}
|
||||
|
||||
export enum OfficeRoomState {
|
||||
active = "active",
|
||||
idle = "idle",
|
||||
archived = "archived",
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
import { Timestamp } from "firebase/firestore";
|
||||
|
||||
export default class Room {
|
||||
id: string;
|
||||
|
||||
name: string;
|
||||
description: string;
|
||||
|
||||
link: string; // google meet link for now
|
||||
|
||||
members: string[] = []; //userIds of "mandatory"/invited people including the person who created it
|
||||
|
||||
membersInRoom: string[] = [];
|
||||
|
||||
attachments: string[] = []; // the links themselves (NOT Ids)...there will be duplicate entries in the attachments table which will be created
|
||||
|
||||
type: RoomType;
|
||||
status: RoomStatus = RoomStatus.empty;
|
||||
|
||||
approximateDateTime: string; // vaguely say when the meeting should be...give user pointers
|
||||
scheduledDateTime: Timestamp;
|
||||
|
||||
// scheduledJsDateTime(): Date {
|
||||
// return this.scheduledDateTime.toDate();
|
||||
// }
|
||||
|
||||
createdDate: Timestamp;
|
||||
|
||||
// createdJsDate(): Date {
|
||||
// return this.createdDate.toDate();
|
||||
// }
|
||||
|
||||
createdByUserId: string;
|
||||
|
||||
teamId: string;
|
||||
|
||||
lastUpdatedDate: Timestamp;
|
||||
}
|
||||
|
||||
export enum RoomType {
|
||||
now = "now",
|
||||
scheduled = "scheduled", // one time sort of standard meeting
|
||||
recurring = "recurring", //daily standup
|
||||
}
|
||||
|
||||
export enum RoomStatus {
|
||||
live = "live",
|
||||
empty = "empty",
|
||||
archived = "archived", // user marks it over
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
import { Timestamp } from "firebase/firestore";
|
||||
|
||||
export class Team {
|
||||
id: string;
|
||||
name: string;
|
||||
|
||||
status: TeamStatus;
|
||||
|
||||
allowedUserCount: number = 2;
|
||||
// subscriptionPlan: TeamSubscriptionPlan = TeamSubscriptionPlan.basic
|
||||
|
||||
companySite: string;
|
||||
|
||||
createdByUserId: string;
|
||||
createdDate: Timestamp;
|
||||
|
||||
lastUpdatedDate: Timestamp;
|
||||
}
|
||||
|
||||
export enum TeamStatus {
|
||||
created = "created",
|
||||
deactivated = "deactivated",
|
||||
deleted = "deleted",
|
||||
}
|
||||
|
||||
export enum TeamSubscriptionPlan {
|
||||
free = "free",
|
||||
basic = "basic",
|
||||
pro = "pro",
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
import { Timestamp } from "firebase/firestore";
|
||||
|
||||
export class TeamMember {
|
||||
id: string;
|
||||
userId: string;
|
||||
teamId: string;
|
||||
|
||||
inviteEmailAddress: string;
|
||||
invitedByUserId: string;
|
||||
|
||||
role: TeamMemberRole
|
||||
status: TeamMemberStatus
|
||||
|
||||
createdDate: Timestamp
|
||||
lastUpdatedDate: Timestamp
|
||||
}
|
||||
|
||||
export enum TeamMemberRole {
|
||||
admin = "admin"
|
||||
}
|
||||
|
||||
export enum TeamMemberStatus {
|
||||
invited = "invited",
|
||||
activated = "activated",
|
||||
deleted = "deleted"
|
||||
}
|
||||
Reference in New Issue
Block a user