diff --git a/database/CommunityReport.ts b/database/CommunityReport.ts new file mode 100644 index 0000000..52727fe --- /dev/null +++ b/database/CommunityReport.ts @@ -0,0 +1,29 @@ +import { prop, getModelForClass, Ref } from "@typegoose/typegoose" +import Member, { MemberAdditionalAcknowledgement, MemberUsedLanguages, MemberUsedOperatingSystems } from "./Member"; + +interface AddtlScoreData { + activity: number; + roles: number; + moderation: number; + cloudServices: number; + misc: number; +} + +/* TODO +* Comments +* Further attributes for class +* */ + +export default class CommunityReport { + @prop({ required: true, index: true, ref: () => Member }) + public member: Ref | undefined; + + @prop() + public lastUpdated: Date | undefined; + + @prop() + public score: number | undefined; + + @prop() + public additionalScoreData: AddtlScoreData | undefined; +} diff --git a/database/Inquiry.ts b/database/Inquiry.ts new file mode 100644 index 0000000..9f0e2df --- /dev/null +++ b/database/Inquiry.ts @@ -0,0 +1,25 @@ +import { prop, getModelForClass, Ref } from "@typegoose/typegoose" +import Member, { MemberAdditionalAcknowledgement, MemberUsedLanguages, MemberUsedOperatingSystems } from "./Member"; +import CommunityReport from "./CommunityReport" + +/** + * TODO: + * - Comments + * - Inquiry identifier + * - Reason + */ + + +export default abstract class Inquiry { + @prop({ required: true, index: true, ref: () => Member }) + public member: Ref | undefined; + + @prop({ required: true }) + public date: Date | undefined; + + @prop({ required: true, ref: () => Member }) + public initiatedBy: Ref | string | undefined; + + @prop({ required: true, ref: () => CommunityReport }) + public report: Ref | undefined; +}