Skip to content

Instantly share code, notes, and snippets.

@colevoss
Last active March 22, 2018 16:36
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 colevoss/09b4a949a89bf112b8f7da2bf4820486 to your computer and use it in GitHub Desktop.
Save colevoss/09b4a949a89bf112b8f7da2bf4820486 to your computer and use it in GitHub Desktop.
Example schema for photos to web

version int

When a published project is updated, this will be incremented

companyCamCollectionId int

Reference to the collection in CompanyCam's database for various API purposes

title string

Title of the project

description string

Longer description of the project

categories Array<string>

Types or categories that this project fits into. (We could call this types instead of categories)

featureImage string

The cover or feature image to be shown at the top of the published page

photos Array<{url: string, created_at: int}>

A list of photos that are being published

materials Array<string>

A list of materials used for the project

{
"version": 1,
"companyCamCollectionId": 123,
"title": "Remodel of 1224 S 58th",
"description": "This was quite the overhaul, changing from a 4 bedroom house to a 3 bedroom house with spacious master bath",
"categories": ["Fireplace Repair", "Lighting Design", "Plumbing"],
"featureImage": "https://static.companycam.com/some-feature-image.jpg",
"photos": [
{
"url": "https://static.companycam.com/y8-qPvfXQsk1500671297.jpg",
"created_at": 1500673423
},
{
"url": "https://static.companycam.com/5c-YBKXKU1g1500671288.jpg",
"created_at": 1500673430
},
{
"url": "https://static.companycam.com/LRJLufSAAAg1500651396.jpg",
"created_at": 1500673442
}
],
"materials": ["Shingles Type A", "2x4 Lumber", "A hammer", "Blood", "Sweat", "Tears"]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment