Skip to content

Instantly share code, notes, and snippets.

@digi0ps
Created May 28, 2019 17:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save digi0ps/f5a980f4ef1cfc239fe988850d1c6d3a to your computer and use it in GitHub Desktop.
Save digi0ps/f5a980f4ef1cfc239fe988850d1c6d3a to your computer and use it in GitHub Desktop.
Data schema for VISIIT

reVISIT

Data Structure / Schema

Did a brief survey of the existing website to analyse the current data structures.

Notes

  1. The data structures are written in a pseudo schema below (i.e it doesn't define the structure in any language, it's just for you to understand, you can implement it in any database/language).

  2. It's not the permanent structure and doesn't represent the existing as whole. Subject to change.

  3. string => denotes a string. string[] => denotes array of strings.

Strucutres

Writted in the format of: Tablename { field: typeof(field) ... }

User {
    first_name: string
    last_name: string
    email: string
    phone: number
    password: hash
    isAdmin: boolean
}

Package {
    name: string
    description: string
    price: number
    location: string
    duration: string
    activites: string[]
    images: url[]
    itenary: Itenary[]
    inclusions: string || string[]
    exclusions: string || string[]
    conditions: string || string[]
}

Itenary {
    day: number
    content: string
}

Category {
    name: string
    packages: [Array of Package]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment