-
Notifications
You must be signed in to change notification settings - Fork 2
Nexpo models
Victor Winberg edited this page Oct 7, 2018
·
6 revisions
const User = {
username: String,
firstName: String,
lastName: String,
email: String,
foodPreferences: String,
phoneNumber: String,
many_to_many: {
roles: Role
}
}
const Role = {
type: String,
many_to_many: {
users: User
}
}
const Student = {
resumeEn: String,
resumeSv: String,
year: Number,
gender: String,
belongs_to: {
user: User
},
has_one: {
programme: Programme,
hostApplication: HostApplication,
}
}
const Programme = {
code: String,
name: String,
has_many: {
students: Student
}
}
const Company = {
name: String,
logoUrl: String,
description: Text,
website: String,
studentSessionDays: Number,
has_many: {
desiredProgrammes: 'DesiredProgramme',
companyAttributes: CompanyAttribute,
},
many_to_many: {
jobOffers: JobOffer,
industries: Industry,
}
}
const JobOffer = {
type: String,
many_to_many: {
companies: Company
}
}
const Industry = {
name: String,
many_to_many: {
companies: Company
}
}
const CompanyAttribute = {
type: String,
title: String,
value: String,
belongs_to: {
company: Company
}
}
const StudentSession = {
start: Date,
end: Date,
belongs_to: {
company: Company,
student: Student
}
}
const StudentSessionApplication = {
motivation: Text,
companyApproved: Boolean,
studentConfirmed: Boolean,
belongs_to: {
company: Company,
student: Student
}
}
const StudentSessionTimeSlot = {
start: Date,
end: Date,
used: Boolean,
belongs_to: {
company: Company
}
}
const HostApplication = {
motivation: Text,
shirtSize: String,
score: Number,
heardVia: String,
availability: String,
internationalStudent: Boolean,
driverLicense: Boolean,
attendKickoff: Boolean,
attendGasque: Boolean,
hasArkadExperience: Boolean,
has_one: {
hostApplicationResponse: HostApplicationResponse,
},
has_many: {
companies: 'HostApplicationCompany',
tasks: 'HostApplicationTask',
}
}
const HostApplicationResponse = {
approved: Boolean,
score: Number,
belongs_to: {
hostApplication: HostApplication
},
has_one: {
task: Task,
company: Company
}
}
const HostGroup = {
name: String,
description: Text,
applicationStart: Date,
applicationEnd: Date,
has_many: {
tasks: Task
}
}
const Task = {
name: String,
belongs_to: {
hostGroup: HostGroup
}
}
const Event = {
name: String,
photoUrl: String,
location: String,
language: String,
description: String,
nrofseats: Number, // name ?
hasFood: Boolean,
typeoffood: String, // ?
start: Date,
end: Date,
lastRegistrationDate: Date,
eventUrl: String,
has_one: {
registeredMail: MailTemplate,
unregisteredMail: MailTemplate,
enrolledMail: MailTemplate,
reservMail: MailTemplate,
},
has_many: {
eventReservations: EventReservation
}
}
const EventReservation = {
status: String, // NOT_HANDLED, RESERV, ENROLLED
showedUp: Boolean,
additionalInformation: String,
belongs_to: {
event: Event,
student: Student
}
}
const Gasque = {
location: String,
capacity: Number,
buffer: Number,
price: Number,
start: Date, // required: Please fill starttime for Banquet
end: Date, // required: Please fill endtime for Banquet
has_one: {
thankyoumail: Mailtemplate,
reservmail: Mailtemplate,
paymentreceivedmail: Mailtemplate,
paymentinformationmail: Mailtemplate,
unregisteredmail: Mailtemplate,
seatofferedmail: Mailtemplate
}
}
const GasqueReservation = {
status: String, // NOT_HANDLED, RESERV, ENROLLED
membership: String, // required: Membership has to be chosen
drinkpackage: String, // required: Drink package has to be chosen
payed: Boolean,
ocr: String, // default: YOUR_NAME
belongs_to: {
user: User
}
}
const Deadline = {
name: String,
start: Date,
end: Date
}
const Option = {
name: String,
value: String
}
const MailTemplate = {
name: String,
subject: String,
content: Text,
signature: String
}
Old Model
const User = {
firstName: String, // required: Please fill in your first name
lastName: String, // required: Please fill in your last name
displayName: String,
email: String, // Please fill a valid email address
username: {
type: String,
unique: 'Username already exists',
required: 'Please fill in a username',
},
program: String,
phone: String,
foodpref: String,
password: String,
salt: String,
profileImageURL: String, // default: '/img/profile/default.png'
provider: String, // required: Provider is required
providerData: {},
additionalProvidersData: {},
roles: {
type: [{
type: String,
enum: ['user', 'admin']
}],
default: ['user'],
required: 'Please provide at least one role'
},
resetPasswordToken: String,
resetPasswordExpires: Date
}
const Student = {
name: String, // required: Please fill Student name
assignment: String,
education: String,
profile: String,
user: User
}
const Application = {
name: String, // required
year: String, // default: true
companies: [{
name: String,
motivation: String,
resumeLanguage: String,
htmlPdfLink: String
}],
resume: {
swedishLink: String,
englishLink: String
},
phone: String, // default: true
email: String, // default: true
times: [{ day: String, hour: [ Number ] }],
program: String, // default: true
user: User
}
const Applicationsetting = {
startdate: Date, // required: Please fill the start date for the application period
enddate: Date, // required: Please fill the end date for the application period
terminatedate: Date, // required: Please fill the date of termination for this setting
frontpagehtml: String, // required: Please fill HTML code for front page
meetingtime: String,
name: String, // required: Please fill Applicationsetting name
active: Boolean, // default: false
user: User
}
const Company = {
name: String, // required: Please fill Company name
facility: String,
profileImageURL: String,
description: String,
weOffer: [String],
desiredProgramme: [{ type: String }],
branch: [{ type: String }],
whyStudentSession: String,
didYouKnow: String,
website: String,
language: String,
wednesday: {
hasMeetings: Boolean,
meetingLength: Number,
starttime: String,
endtime: String,
lunchstart: String,
lunchend: String
},
thursday: {
hasMeetings: Boolean,
meetingLength: Number,
starttime: String,
endtime: String,
lunchstart: String,
lunchend: String
},
meetings: [{
student: {
id: Application,
name: String
},
startTime: String,
endTime: String,
day: String,
forced: Boolean,
fixed: Boolean
}],
chosenStudents: [Application],
active: Boolean,
gasqueTickets: Number,
drinkTickets: Number,
user: User
}
const Taskgroup = {
name: String, // required: Please fill Taskgroup name
engname: String, // required: Please fill the english Taskgroup name
description: String,
tasks: [ { name: String, quantity: Number, description: String } ],
taskperiod: { start: Date, end: Date },
applicationperiod: { start: Date, end: Date },
active: Boolean,
user: User
}
const Taskapplication = {
name: String, // required: Please fill the applicants name
program: String, // required: Please fill the applicants program
year: String, // required: Please fill the applicants year
email: String, // required: Please fill the applicants email
phone: String, // required: Please fill the applicants phone
tshirtsize: String, // required: Please fill the applicants tshirtsize
foodpref: String,
motivation: String, // required: Please fill the applicants motivation
heardvia: String, // required: Please fill in where you heard about arkad
availability: {
type: String,
default: 'Always',
required: 'Please fill the applicants availability during arkad',
},
choices: [{ order: Number, choice: String }],
internationalStudent: Boolean, // required: Please fill if the applicant is a international student
driverLicense: Boolean, // required: Please fill if the applicant has a driver license
attendGasque: Boolean, // required: Please fill if the applicant can attend the gasque
attendKickoff: Boolean, // required: Please fill if the applicant can attend the host kickoff
assignedCompany: String,
chosenCompanies: [{
name: String,
order: Number
}],
assignedTask: String,
point: Number,
taskgroup: Taskgroup,
user: User
}
const Mailtemplate = {
name: String, // required: Please fill Mailtemplate name
subject: String,
content: String,
signature: String,
user: User
}
const Banquet = {
name: String, // required: Please fill Banquet name
textNonpaying: String,
textPaying: String,
location: String,
capacity: Number,
buffer: Number,
date: Date, // required: Please fill Banquet date
starttime: String, // required: Please fill starttime for Banquet
endtime: String, // required: Please fill endtime for Banquet
tables: [{
name: String,
quantity: Number,
description: String
}],
active: Boolean, // required: Please fill status of the Banquet
thankyoumail: Mailtemplate,
reservmail: Mailtemplate,
paymentreceivedmail: Mailtemplate,
paymentinformationmail: Mailtemplate,
unregisteredmail: Mailtemplate,
seatofferedmail: Mailtemplate,
user: User
}
const GasqueReservation = {
name: String, // required: Please fill in your name
email: String,
phone: String,
program: String,
company: String,
title: String,
membership: String, // required: Membership has to be chosen
drinkpackage: String, // required: Drink package has to be chosen
foodpref: [String],
other: String,
gender: String, // required: Please fill in your gender
desiredPrograms: [String],
price: Number,
payed: Boolean,
ocr: String, // default: YOUR_NAME
confirmed: Boolean,
honorary: Boolean,
enrolled: Boolean,
reserve: Boolean,
pending: Boolean,
pendingdeadline: Date,
user: User
}
const Tableplanning = {
name: String, // required: Please fill Tableplanning name
tables: [{
nbrSeats: Number,
name: String,
seats: [{
nbr: Number,
name: String,
company: String,
matched: Number,
gender: String,
id: GasqueReservation
}]
}],
user: User
}
const Arkadevent = {
name: String, // required: Please fill in a name for the event.
photo: String,
data: {},
location: String, // required: Please fill in a location for the event.
language: String, // required: Please pick a language for the event.
description: String, // required: Please fill in a description for the event.
seatstaken: Number,
nrofseats: Number, // required: Please fill in the maximum number of seats.
foodserved: Boolean,
typeoffood: String,
date: Date, // required: Pick a date for the event.
starttime: Date, // required: Pick a start time for the event.
endtime: Date, // required: Pick an end time for the event.
lastregistrationdate: Date, // required: Pick a last registration date for the event.
registeredmail: Mailtemplate,
reservmail: Mailtemplate,
unregisteredmail: Mailtemplate,
seatofferedmail: Mailtemplate,
public: Boolean,
reservationopen: Boolean,
eventURL: String, // default: process.env.HOST_URL + "/reservations/create/"
user: User
}
const EventReservation = {
name: String, // required: Please fill Reservation name
program: String, // required: Please fill program
year: String, // required: Please fill year
email: String, // required: Please fill the email
phone: String, // required: Please fill the phonenumber
foodpref: [String],
other: String,
showedup: Boolean,
arkadevent: Arkadevent,
enrolled: Boolean,
standby: Boolean,
pending: Boolean,
offer: Date,
user: User
}