Staff:
  tableName: staff
  columns:
    id:
      type: integer
      unsigned: true
      primary: true
      autoincrement: true
    name:
      type: string(255)
    password:
      type: string(255)
    username:
      type: string(255)
  options:
    collate: utf8_unicode_ci
    charset: utf8
	
public_pages:
  tableName: Public_Pages
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    title:
      type: string(255)
    page_content:
      type: string
    last_update:
      type: date

country:
  tableName: Country
  columns:
    country_id:
      type: integer(20)
      primary: true
      autoincrement: true
    country_name:
      type: string(255)
    country_iso_code_2:
      type: string(255)
    country_iso_code_3:
      type: string(255)

Images:
  tableName: images
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    path:
      type: string(255)
    type:
      type: integer(3)

Videos:
  tableName: videos
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    path:
      type: string(255)
    type:
      type: integer(3)

MakeoverCategories:
  tableName:  makeover_categories
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    title:
      type: string(255)
    metas:
      type: string(255)
    description:
      type: string(255)
    video_id:
      type: integer(20)
    image_id:
      type: integer(20)
    is_video:
      type: integer(20)
      default: '0'
  relations:
    Images:
      local: image_id
      foreign: id
    Videos:
      local: video_id
      foreign: id

MakeoverProducts:
  tableName:  makeover_products
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    category_id:
      type: integer(20)
    title:
      type: string(100)
    price:
      type: integer(10)
    max_people_per_group:
      type: string(100)
    refreshment:
      type: boolean
      default: '0'
    hair_cleaner_condition:
      type: boolean
      default: '0'
    hair_consultation:
      type: boolean
      default: '0'
    cut:
      type: boolean
      default: '0'
    blowdry:
      type: boolean
      default: '0'
    finish:
      type: boolean
      default: '0'
    new_id_consultation:
      type: boolean
      default: '0'
    hand_beauty_treatments:
      type: boolean
      default: '0'
    skin_refresh:
      type: boolean
      default: '0'
    mak_up_applied:
      type: boolean
      default: '0'
    hair_styled:
      type: boolean
      default: '0'
    prof_photoshoot:
      type: boolean
      default: '0'
    prof_viewing:
      type: boolean
      default: '0'
    prof_prints:
      type: string(100)
    short_description:
      type: string(100)
    long_description:
      type: string
    additional_price:
      type: integer(10)
    metas:
      type: string
    image_id:
      type: integer(20)
    is_confirmed:
      type: integer(20)
      default: '1'
    date_time:
      type: date
      default: '0000-00-00'
  relations:
    Images:
      foreignAlias: Makeover_Image
      local: image_id
      foreign: id
    MakeoverCategories:
      foreignAlias: Makeover_Categories
      local: category_id
      foreign: id

MakeoverProductsPhotostrp:
  tableName:  Makeover_products_photostrp
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    makeover_product_id:
      type: integer(20)
    image_id:
      type: integer(20)
    date_time:
      type: date
      default: '0000-00-00'
  relations:
    MakeoverProducts:
      foreignAlias: Makeover_Products_PhotoStrp
      local: makeover_product_id
      foreign: id
    Images:
      foreignAlias: Makeover_Products_PhotoStrp_Image
      local: image_id
      foreign: id

StudioLocations:
  tableName: studio_locations
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    title:
      type: string(100)
    description:
      type: string
    address:
      type: string
    metas:
      type: string
    date_time:
      type: date
      default: '0000-00-00'

StudioPics:
  tableName:  studio_pics
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    location_id:
      type: integer(20)
    image_id:
      type: integer(20)

  relations:
    StudioLocations:
      foreignAlias: studio_pics_location
      local: location_id
      foreign: id
    Images:
      foreignAlias: studio_pics_Image
      local: image_id
      foreign: id

ProductCategories:
  tableName: product_categories
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    title:
      type: string(100)
    description:
      type: string
    metas:
      type: string
    image_id:
      type: integer(20)
    parent_id:
      type: integer(20)
      default: '0'
    date_time:
      type: date
      default: '0000-00-00'
  relations:
    Images:
      foreignAlias: Product_Categories_Image
      local: image_id
      foreign: id

ProductsShades:
  tableName: products_shades
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    title:
      type: string(100)

Products:
  tableName: products
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    category_id:
      type: integer(20)
    title:
      type: string(100)
    description:
      type: string
    shade_ref:
      type: string(100)
    code_ref:
      type: string(100)
    metas:
      type: string
    price:
      type: string(100)
    image_id:
      type: integer(20)
    date_time:
      type: date
      default: '0000-00-00'
  relations:
    Images:
      foreignAlias: Product_Image
      local: image_id
      foreign: id
    ProductCategories:
      foreignAlias: Product_Categories
      local: category_id
      foreign: id

NewsLetter:
  tableName: news_letter
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    title:
      type: string(100)
    description:
      type: string
    date_time:
      type: date
      default: '0000-00-00'

Tickets:
  tableName: tickets
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    name:
      type: string(255)
    telephone:
      type: string(100)
    email:
      type: string(100)
    hear_about_us:
      type: string(100)
    comment:
      type: string
    status:
      type: integer(2)
      default: '0'
    date_time:
      type: timestamp
      default: '0000-00-00 00:00:00'

Vacancies:
  tableName: vacancies
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    title:
      type: string(100)
    description:
      type: string
    location_id:
      type: string(100)
    is_active:
      type: boolean
      default: '0'
    date_time:
      type: date
      default: '0000-00-00'
    opening_date:
      type: date
      default: '0000-00-00'
    closing_date:
      type: date
      default: '0000-00-00'	  	  
  relations:
    StudioLocations:
      foreignAlias: vacanacy_locations
      local: location_id
      foreign: id	  

Gallery:
  tableName: gallery
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    title:
      type: string(100)
    description:
      type: string
    is_active:
      type: boolean
      default: '0'
    date_time:
      type: date
      default: '0000-00-00'

GalleryPhotos:
  tableName: gallery_photos
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    gallery_id:
      type: integer(20)
    title:
      type: string(100)
    original_image_id:
      type: integer(20)
    cropped_image_id:
      type: integer(20)
    date_time:
      type: date
      default: '0000-00-00'
  relations:
    Images:
      foreignAlias: Gallary_Image
      local: original_image_id
      foreign: id
    Gallery:
      foreignAlias: Gallary_id
      local: gallery_id
      foreign: id

Magzine:
  tableName: magzine
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    title:
      type: string(100)
    description:
      type: string
    is_active:
      type: boolean
      default: '0'
    date_time:
      type: date
      default: '0000-00-00'

MagzinePhotos:
  tableName: magzine_photos
  columns:
    id:
      type: integer(20)
      primary: true
      autoincrement: true
    magzine_id:
      type: integer(20)
    defaults:
      type: integer(10)
    image_id:
      type: integer(20)
    caption:
      type: string(255)
  relations:	
    Magzine:
      foreignAlias: Magzine_Photo_Upload
      local: magzine_id
      foreign: id
    Images:
      foreignAlias: Magzine_Images
      local: image_id
      foreign: id