Skip to content

Database

Diogo Pacheco edited this page Sep 3, 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, public_name: String, available: Boolean }], // templates
  items: [Item],
  meetings: [Meeting],
  sessions: [Session]
}

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

// participation days will be items, for example

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

Billing

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

CompanyRep

{
  name: String,
  contact: Contact
}

Company

{
  name: String,
  description: String,
  imgs: {
    internal: String,
    public: 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],
    subscribers: [Member],
    billing: Billing,
    package: Package,
    confirmed: Date,
    partner: Boolean,
    notes: String,
  }],
}

FlightInfo

{
  inbound: Date,
  outbound: Date,
  from: String,
  to: String,
  link: String,
  bought: Boolean,
  cost: Number, // € -> can serve as budget
  notes: String
} 

Speaker

{
  name: String,
  contact: Contact,
  title: String,
  bio: String,
  notes: String,
  img: {
    internal: String,
    speaker: String,
    company: String
  },
  participations: [{
    event: Event,
    member: Member,
    status: ['SUGGESTED', 'SELECTED', 'ON_HOLD', 'CONTACTED', 'IN_CONVERSATIONS', 'ACCEPTED', 'REJECTED', 'GIVEN_UP', 'ANNOUNCED'],
    communications: [Thread],
    subscribers: [Member],
    feedback: String,
    flights: FlightInfo
    guests: [{  
      name: String,
      flight: FlightInfo
    }],
    room: { 
      type: String,
      cost: Number, // €
      notes: String 
    },
  ]},
}

Post

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

Thread

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

Meeting

{
  begin: Date,
  end: Date,
  place: String,
  minute: String, // aka ata
  participants: { members: [Member], companyReps: [CompanyRep] }
}

Notification

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

Session

{
  begin: Date,
  end: Date,
  title: String,
  description: String,
  space: String,
  kind: ['TALK', 'PRESENTATION', 'WORKSHOP'],
  company: Company,
  dinamizers: [{
    name: String,
    position: String,
  }],
  speaker: Speaker,
  videoURL: String
}

Database Structure

Endpoints Tables

Endpoints Usage

Clone this wiki locally