Skip to content

Database

Francisco Pereira edited this page Jun 19, 2019 · 52 revisions

Event

{
  name: String,
  begin: Date,
  end: Date,
  themes: [String]
  id: Number, // ex: SINFO 26 has id 26
  teams: [Team],
  packages: [{ template: Package, available: Boolean }], // templates
  items: [{ item: Item, available: Number }],
  meetings: [Meeting]
}

Team

{
  name: String,
  members: [{
    member: Member, 
    role: ['MEMBER', 'TEAM_LEADER', 'COORDINATOR', 'ADMIN'],
  }],
  meetings: [Meeting]
}

Member

{
  name: String,
  img: String,
  istid: String
  contact: Contact,
  notifications: [Notification]
}

Contact

{
  phones: [{
    phone: String,
    valid: Boolean
  }],
  socials: {
    facebook: String,
    skype: String,
    github: String,
    twitter: String,
    linkedin: String
  },
  mails: [{
      mail: String,
      personal: Boolean
      valid: Boolean
  }],
}

Item

{
  name: String,
  type: String,
  description: String,
  img: String,
  price: Number // €,
  vat: Number // %
}

Package

{
  name: String,
  items: [{ item: Item, quantity: Number }],
  price: Number,
  vat: Number,
  days: Number
}

Billing

{
  status: {
    pro_forma: Boolean,
    invoice: Boolean,
    receipt: Boolean,
    payed: Boolean
  },
  employer: CompanyRep,
  value: Number, // €
  invoiceNumber: String,
  emission: Date,
  notes: String
}

CompanyRep

{
  name: String,
  contact: Contact
}

Company

{
  name: String,
  description: String,
  imgs: {
    internal: String,
    vectorial: [String]
  },
  site: String,
  employers: [CompanyRep],
  billingInfo: {
    name: String,
    address: String,
    tin: String, // tax identification number (NIF)
  }
  participations: [{
    event: Event
    member: Member,
    status: ['SUGGESTED', 'SELECTED', 'ON_HOLD', 'CONTACTED', 'IN_CONVERSATIONS', 'ACCEPTED', 'REJECTED', 'GIVEN_UP', 'ANNOUNCED'],
    communications: [Thread],
    billing: Billing,
    package: Package,
    confirmed: Date,
    notes: String,
    subscribers: [Member]
  }],
}

Speaker

{
  name: String,
  contact: Contact,
  title: String,
  bio: String,
  notes: String,
  img: {
    internal: String,
    speaker: String,
    company: String
  },
  participations: [{
    event: Event,
    member: String,
    status: ['SUGGESTED', 'SELECTED', 'APPROVED', 'CONTACTED', 'IN_CONVERSATIONS', 'ACCEPTED', 'REJECTED', 'GIVEN_UP', 'ANNOUNCED'],
    communications: [Thread],
    subscribers: [Member],
    feedback: String
  }]
}

Post

{
  member: Member,
  text: String,
  posted: Date,
  updated: Date
}

Thread

{
  entry: Post
  meeting: Meeting,
  comments: [Post],
  kind: ['TEMPLATE', 'TO', 'FROM', 'MEETING'],
  status: ['APPROVED', 'REVIEWED', 'PENDING'],
  subscribers: [Member]
}

Meeting

{
  begin: Date,
  end: Date,
  place: String,
  minutes: String,
  participants: { members: [Member], companyReps: [CompanyRep] }
}

Notification

{
  post: Post,
  speaker: Speaker,
  company: Company,
  meeting: Meeting,
  description: String,
  seen: Boolean
}

Database Structure

Endpoints Tables

Endpoints Usage

Clone this wiki locally