74 lines
1.7 KiB
TypeScript
74 lines
1.7 KiB
TypeScript
import { prop, getModelForClass } from "@typegoose/typegoose";
|
|
import Member from "./Member";
|
|
|
|
/* TODO
|
|
* Comments
|
|
* Further attributes for class
|
|
* */
|
|
|
|
import { SharedMemberAttributes } from "./Member";
|
|
|
|
export type PartnerTitle =
|
|
"Director of Engineering" |
|
|
"Director of Operations" |
|
|
"Deputy Director of Engineering" |
|
|
"Deputy Director of Operations" |
|
|
"Services Manager" |
|
|
"Project Manager" |
|
|
"Engineering Core Partner" |
|
|
"Operations Core Partner" |
|
|
"Community Moderator" |
|
|
"Technician" |
|
|
string;
|
|
|
|
|
|
export enum PartnerDepartment {
|
|
INDEPENDENT_AGENCY,
|
|
ENGINEERING, // Department of Engineering
|
|
OPERATIONS // Department of Operations
|
|
}
|
|
|
|
export enum PartnerRoleType {
|
|
MANAGERIAL,
|
|
NONMANAGERIAL,
|
|
}
|
|
|
|
export enum PartnerCommissionType {
|
|
TENURE,
|
|
PROVISIONAL,
|
|
CONTRACTUAL,
|
|
ACTING,
|
|
INTERIM,
|
|
TRIAL,
|
|
}
|
|
|
|
export default class Partner implements SharedMemberAttributes {
|
|
@prop({ required: true, unique: true })
|
|
public discordID: string | undefined;
|
|
|
|
@prop()
|
|
public emailAddress: string | undefined;
|
|
|
|
@prop({ required: true })
|
|
public roleType: PartnerRoleType | undefined;
|
|
|
|
@prop({ required: true })
|
|
public commissionType: PartnerCommissionType | undefined;
|
|
|
|
@prop({ required: true })
|
|
public department: PartnerDepartment | undefined;
|
|
|
|
@prop({ required: true })
|
|
public title: PartnerTitle | "Partner" | undefined;
|
|
|
|
@prop()
|
|
//
|
|
public directReport: Partner | string | undefined;
|
|
|
|
@prop()
|
|
// this field dictates if the partner is able to perform developer commands, such as "eval"
|
|
public canPerformDevCommands: boolean | undefined;
|
|
}
|
|
|
|
export const PartnerModel = getModelForClass(Partner);
|