2024-11-09 18:14:24 -05:00
|
|
|
import { prop, getModelForClass, Ref } from "@typegoose/typegoose";
|
2024-03-22 00:15:45 -04:00
|
|
|
import Member from "./Member";
|
|
|
|
|
|
|
|
/* TODO
|
2024-10-25 16:57:33 -04:00
|
|
|
* Comments
|
|
|
|
* Further attributes for class
|
|
|
|
* */
|
2024-03-22 00:15:45 -04:00
|
|
|
|
2024-04-02 16:38:27 -04:00
|
|
|
import { SharedMemberAttributes } from "./Member";
|
|
|
|
|
2024-03-22 00:15:45 -04:00
|
|
|
export type PartnerTitle =
|
2024-10-25 16:57:33 -04:00
|
|
|
| "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;
|
2024-03-22 00:15:45 -04:00
|
|
|
|
|
|
|
export enum PartnerDepartment {
|
2024-10-25 16:57:33 -04:00
|
|
|
INDEPENDENT_AGENCY,
|
|
|
|
ENGINEERING, // Department of Engineering
|
|
|
|
OPERATIONS, // Department of Operations
|
2024-03-22 00:15:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export enum PartnerRoleType {
|
2024-10-25 16:57:33 -04:00
|
|
|
MANAGERIAL,
|
|
|
|
NONMANAGERIAL,
|
2024-03-22 00:15:45 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export enum PartnerCommissionType {
|
2024-10-25 16:57:33 -04:00
|
|
|
TENURE,
|
|
|
|
PROVISIONAL,
|
|
|
|
CONTRACTUAL,
|
|
|
|
ACTING,
|
|
|
|
INTERIM,
|
|
|
|
TRIAL,
|
2024-03-22 00:15:45 -04:00
|
|
|
}
|
|
|
|
|
2024-04-02 16:38:27 -04:00
|
|
|
export default class Partner implements SharedMemberAttributes {
|
2024-10-25 16:57:33 -04:00
|
|
|
@prop({ required: true, unique: true })
|
|
|
|
public discordID: string | undefined;
|
2024-04-01 20:04:34 -04:00
|
|
|
|
2024-10-25 16:57:33 -04:00
|
|
|
@prop()
|
|
|
|
public emailAddress: string | undefined;
|
2024-04-02 16:38:27 -04:00
|
|
|
|
2024-10-25 16:57:33 -04:00
|
|
|
@prop({ required: true })
|
|
|
|
public roleType: PartnerRoleType | undefined;
|
2024-03-22 00:15:45 -04:00
|
|
|
|
2024-10-25 16:57:33 -04:00
|
|
|
@prop({ required: true })
|
|
|
|
public commissionType: PartnerCommissionType | undefined;
|
2024-03-22 00:15:45 -04:00
|
|
|
|
2024-10-25 16:57:33 -04:00
|
|
|
@prop({ required: true })
|
|
|
|
public department: PartnerDepartment | undefined;
|
2024-03-22 00:15:45 -04:00
|
|
|
|
2024-10-25 16:57:33 -04:00
|
|
|
@prop({ required: true })
|
|
|
|
public title: PartnerTitle | "Partner" | undefined;
|
2024-03-22 00:15:45 -04:00
|
|
|
|
2024-11-09 18:14:24 -05:00
|
|
|
@prop({ ref: () => Partner })
|
2024-10-25 16:57:33 -04:00
|
|
|
//
|
2024-11-09 18:14:24 -05:00
|
|
|
public directReport?: Ref<Partner> | string | undefined;
|
2024-04-05 20:13:11 -04:00
|
|
|
|
2024-10-25 16:57:33 -04:00
|
|
|
@prop()
|
|
|
|
// this field dictates if the partner is able to perform developer commands, such as "eval"
|
|
|
|
public canPerformDevCommands: boolean | undefined;
|
2024-03-22 00:15:45 -04:00
|
|
|
}
|
2024-04-01 20:04:34 -04:00
|
|
|
|
|
|
|
export const PartnerModel = getModelForClass(Partner);
|