From a1e59fa275e859421bbdaffa3febfdb4e64a1655 Mon Sep 17 00:00:00 2001 From: Matthew Date: Tue, 2 Apr 2024 16:38:27 -0400 Subject: [PATCH] Member.ts and Parner.ts classes shall implement interface SharedMemberAttributes --- database/Member.ts | 6 +++++- database/Partner.ts | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/database/Member.ts b/database/Member.ts index 777310b..9db9e4b 100644 --- a/database/Member.ts +++ b/database/Member.ts @@ -5,6 +5,10 @@ import { prop, getModelForClass } from "@typegoose/typegoose" * Further attributes for class * */ +export interface SharedMemberAttributes { + discordID: string | undefined; +} + export type MemberAdditionalAcknowledgement = "Chair of the Board of Governors" | "Vice Chair of the Board of Governors" | @@ -39,7 +43,7 @@ export enum MemberUsedOperatingSystems { UBUNTU = "os-ubuntu", WIN = "os-win" } -export default class Member { +export default class Member implements SharedMemberAttributes { @prop({ required: true, unique: true }) public discordID: string | undefined; diff --git a/database/Partner.ts b/database/Partner.ts index 2c9446f..68825df 100644 --- a/database/Partner.ts +++ b/database/Partner.ts @@ -6,6 +6,8 @@ import Member from "./Member"; * Further attributes for class * */ +import { SharedMemberAttributes } from "./Member"; + export type PartnerTitle = "Director of Engineering" | "Director of Operations" | @@ -40,10 +42,13 @@ export enum PartnerCommissionType { TRIAL, } -export default class Partner { +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;