crra/database/Member.ts

88 lines
2.2 KiB
TypeScript
Raw Permalink Normal View History

2024-10-25 16:57:33 -04:00
import { prop, getModelForClass } from "@typegoose/typegoose";
/* TODO
2024-10-25 16:57:33 -04:00
* Comments
* Further attributes for class
* */
export interface SharedMemberAttributes {
2024-10-25 16:57:33 -04:00
discordID: string | undefined;
}
export type MemberAdditionalAcknowledgement =
2024-10-25 16:57:33 -04:00
| "Chair of the Board of Governors"
| "Vice Chair of the Board of Governors"
| "Voting Seat Member of the Board of Governors"
| string;
2024-10-24 20:40:37 -04:00
export const MemberGuildRoleIDMap = {
2024-10-25 16:57:33 -04:00
// Chair/Vice Chair of the Board of Governors
CHAIR_OR_VICE_OF_BOARD: "608394038466445320",
// Management
MANAGEMENT: "1077646568091570236",
// Director of Operations
DIRECTOR_OF_OPERATIONS: "1077647072163020840",
// Director of Engineering
DIRECTOR_OF_ENGINEERING: "1077646956890951690",
// Board of Governors
BOARD_OF_GOVERNORS: "662163685439045632",
// Project Manager
PROJECT_MANAGER: "1077647157928132711",
// Services Manager
SERVICES_MANAGER: "1077647467056742482",
// Staff
STAFF: "446104438969466890",
// Technician
TECHNICIAN: "701454780828221450",
// Moderator
MODERATOR: "455972169449734144",
// Core Team
CORE_TEAM: "453689940140883988",
// Intern (Training)
INTERN: "701481967149121627",
};
2024-10-24 20:40:37 -04:00
// enum for the used programming languages in whois information
export enum MemberUsedLanguages {
2024-10-25 16:57:33 -04:00
ASM = "lang-asm",
CFAM = "lang-cfam",
CSHARP = "lang-csharp",
GO = "lang-go",
JAVA = "lang-java",
JS = "lang-js",
KT = "lang-kt",
PY = "lang-py",
RB = "lang-rb",
RS = "lang-rs",
SWIFT = "lang-swift",
TS = "lang-ts",
}
// enum for the used operating systems in the whois information
export enum MemberUsedOperatingSystems {
2024-10-25 16:57:33 -04:00
ARCH = "os-arch",
DEB = "os-deb",
CENT = "os-cent",
FEDORA = "os-fedora",
MDARWIN = "os-mdarwin",
MANJARO = "os-manjaro",
REDHAT = "os-redhat",
UBUNTU = "os-ubuntu",
WIN = "os-win",
}
export default class Member implements SharedMemberAttributes {
2024-10-25 16:57:33 -04:00
@prop({ required: true, unique: true })
public discordID: string | undefined;
2024-10-25 16:57:33 -04:00
@prop()
public usedOperatingSystems: MemberUsedOperatingSystems[] | undefined;
2024-10-25 16:57:33 -04:00
@prop()
public usedLanguages: MemberUsedLanguages[] | undefined;
2024-10-25 16:57:33 -04:00
@prop()
public additionalAcknowledgement: MemberAdditionalAcknowledgement[] | undefined;
}
export const MemberModel = getModelForClass(Member);