add Inquiries and various comments
parent
95f5a864d3
commit
c1945a0bcd
|
@ -0,0 +1,11 @@
|
|||
import { prop, getModelForClass, Ref } from "@typegoose/typegoose"
|
||||
import Inquiry from "./Inquiry";
|
||||
|
||||
/**
|
||||
* HardInquiry is a class which extends Inquiry.
|
||||
* Structure is performed this way to have two separate collections for Hard and Soft inquiries.
|
||||
*/
|
||||
export default class HardInquiry extends Inquiry {
|
||||
@prop({ required: true })
|
||||
public reason: string | undefined;
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
import { prop, getModelForClass, Ref } from "@typegoose/typegoose"
|
||||
import Member, { MemberAdditionalAcknowledgement, MemberUsedLanguages, MemberUsedOperatingSystems } from "./Member";
|
||||
import Member from "./Member";
|
||||
import CommunityReport from "./CommunityReport"
|
||||
|
||||
/**
|
||||
|
@ -11,15 +11,27 @@ import CommunityReport from "./CommunityReport"
|
|||
|
||||
|
||||
export default abstract class Inquiry {
|
||||
@prop({ required: true, unique: true })
|
||||
// the Inquiry Identifier (previously known as `iid`). this is an UUIDv4 string
|
||||
public id: string | undefined;
|
||||
|
||||
@prop({ required: true, index: true, ref: () => Member })
|
||||
// the member on which this inquiry was performed on
|
||||
public member: Ref<Member> | undefined;
|
||||
|
||||
@prop({ required: true })
|
||||
// the date in which this inquiry was performed
|
||||
public date: Date | undefined;
|
||||
|
||||
@prop({ required: true, ref: () => Member })
|
||||
// the reference to the member who initiated this inquiry or a string value representing the name of a system that initiated the inquiry
|
||||
public initiatedBy: Ref<Member> | string | undefined;
|
||||
|
||||
@prop({ required: true, ref: () => CommunityReport })
|
||||
// the report that was generated or fetched from this inquiry as of current date
|
||||
public report: Ref<CommunityReport> | undefined;
|
||||
|
||||
@prop()
|
||||
// a reason for the inquiry, if applicable. this value is required for HardInquiry
|
||||
public reason: string | "N/A" | undefined;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
import Inquiry from "./Inquiry";
|
||||
|
||||
/**
|
||||
* SoftInquiry is a class which extends Inquiry.
|
||||
* Structure is performed this way to have two separate collections for Hard and Soft inquiries.
|
||||
*/
|
||||
export default class SoftInquiry extends Inquiry {}
|
Loading…
Reference in New Issue