---
propel:

  _attributes:    { package: lib.model }

  site_definicoes:
    id:
    modulo:               { type: varchar, size: 255 }
    destino_id:           integer
    culture:              { type: varchar, size: 7 }
    meta_titulo:          { type: varchar, size: 90 }
    meta_palavras_chave:  { type: varchar, size: 200 }
    meta_descricao:       { type: varchar, size: 250 }
    url:                  { type: varchar, size: 250 }
    permalink:            { type: varchar, size: 250 }
    created_at:           
    created_by:           { type: integer, foreignTable: mago_usuario, foreignReference: id, onDelete: set null }
    updated_at:           
    updated_by:           { type: integer, foreignTable: mago_usuario, foreignReference: id, onDelete: set null }
    locked:               tinyint
    
  download:
    _attributes:  { isI18N: true, i18nTable: download_i18n }
    id:
    arquivo_id:     { type: integer, foreignTable: arquivo, foreignReference: id, onDelete: set null }
    categoria_id:   { type: integer, foreignTable: site_categoria, foreignReference: id, onDelete: set null }
    data_inicio:    date
    data_fim:       date
    created_at:
    updated_at:
    created_by:     { type: integer, foreignTable: mago_usuario, foreignReference: id, onDelete: set null }
    updated_by:     { type: integer, foreignTable: mago_usuario, foreignReference: id, onDelete: set null }
    owner_id:       { type: integer, foreignTable: mago_usuario, foreignReference: id, onDelete: set null }

  download_i18n:
    id:          { type: integer, required: true, primaryKey: true, foreignTable: download, foreignReference: id, onDelete: cascade }
    culture:     { isCulture: true, type: varchar(7), required: true, primaryKey: true }
    nome:        { type: varchar, size: 255 }
    link:        { type: varchar, size: 255 }
    tipo:        { type: varchar, size: 20 }
    publicado:   { type: char, size: 1 }
    restrito:    { type: char, size: 1 }

  site_tipo_media:
    id:
    nome:                { type: varchar, size: 100 }
    descricao:           longvarchar

  site_media:
    _attributes:         { isI18N: true, i18nTable: site_media_i18n }
    arquivo_id:          { type: integer, primaryKey: true, foreignTable: arquivo, foreignReference: id, onDelete: cascade }
    site_album_id:       { type: integer, foreignTable: site_album, foreignReference: id, onDelete: cascade }
    site_tipo_media_id:  { type: integer, foreignTable: site_tipo_media, foreignReference: id, onDelete: set null }
    restrito:            { type: char, size: 1 }

  site_media_i18n:
    arquivo_id:   { type: integer, primaryKey: true, foreignTable: site_media, foreignReference: arquivo_id, onDelete: cascade }
    culture:      { isCulture: true, type: varchar(7), required: true, primaryKey: true }
    nome:         { type: varchar, size: 100 }
    descricao:    longvarchar

  site_conteudo_media:
    site_conteudo_id:    { type: integer, primaryKey: true, foreignTable: site_conteudo, foreignReference: id, onDelete: cascade }
    site_media_id:       { type: integer, primaryKey: true, foreignTable: site_media, foreignReference: arquivo_id, onDelete: cascade }
