crra/database/CommunityReport.ts

47 lines
1.4 KiB
TypeScript

import { prop, getModelForClass, Ref } from "@typegoose/typegoose";
import Member, {
MemberAdditionalAcknowledgement,
MemberUsedLanguages,
MemberUsedOperatingSystems,
} from "./Member";
export enum GenerationMethod {
TIMER_INTERNAL, // generated by the internal cron-job timer automatically
INQUIRY_INTERNAL, // internal inquiry generated internally directly through the system. user checks their own inquiry, hard inquiry is performed by a staff member, etc.
INQUIRY_EXTERNAL, // external inquiry generated externally through the system via an external authorized request, such as via EDS
}
export 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 })
// the member on which this report was generated for
public member: Ref<Member> | undefined;
@prop({ required: true })
// the date in which this report was generated on
public date: Date | undefined;
@prop({ required: true })
// the CommScore of the member specified
public score: number | undefined;
@prop({ required: true })
// the method in which this report was generated under
public generationMethod: GenerationMethod | undefined;
@prop({ required: true })
public additionalScoreData: AddtlScoreData | undefined;
}