Member.ts and Parner.ts classes shall implement interface SharedMemberAttributes

master
Matthew 2024-04-02 16:38:27 -04:00
parent 8cd51cac26
commit a1e59fa275
Signed by: matthew
SSH Key Fingerprint: SHA256:piIXekA9q1p0ZGi4ogFbNY1embip5Ytbi3v8AZ8UYq4
2 changed files with 11 additions and 2 deletions

View File

@ -5,6 +5,10 @@ import { prop, getModelForClass } from "@typegoose/typegoose"
* Further attributes for class * Further attributes for class
* */ * */
export interface SharedMemberAttributes {
discordID: string | undefined;
}
export type MemberAdditionalAcknowledgement = export type MemberAdditionalAcknowledgement =
"Chair of the Board of Governors" | "Chair of the Board of Governors" |
"Vice Chair of the Board of Governors" | "Vice Chair of the Board of Governors" |
@ -39,7 +43,7 @@ export enum MemberUsedOperatingSystems {
UBUNTU = "os-ubuntu", UBUNTU = "os-ubuntu",
WIN = "os-win" WIN = "os-win"
} }
export default class Member { export default class Member implements SharedMemberAttributes {
@prop({ required: true, unique: true }) @prop({ required: true, unique: true })
public discordID: string | undefined; public discordID: string | undefined;

View File

@ -6,6 +6,8 @@ import Member from "./Member";
* Further attributes for class * Further attributes for class
* */ * */
import { SharedMemberAttributes } from "./Member";
export type PartnerTitle = export type PartnerTitle =
"Director of Engineering" | "Director of Engineering" |
"Director of Operations" | "Director of Operations" |
@ -40,10 +42,13 @@ export enum PartnerCommissionType {
TRIAL, TRIAL,
} }
export default class Partner { export default class Partner implements SharedMemberAttributes {
@prop({ required: true, unique: true }) @prop({ required: true, unique: true })
public discordID: string | undefined; public discordID: string | undefined;
@prop()
public emailAddress: string | undefined;
@prop({ required: true }) @prop({ required: true })
public roleType: PartnerRoleType | undefined; public roleType: PartnerRoleType | undefined;