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;