# encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative source for your
# database schema. If you need to create the application database on another
# system, you should be using db:schema:load, not running all the migrations
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
# you'll amass, the slower it'll run and the greater likelihood for issues).
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 20160717154555) do

  create_table "admins", force: :cascade do |t|
    t.string   "name",                   limit: 255
    t.string   "firstname",              limit: 255
    t.string   "avatar",                 limit: 255
    t.string   "username",               limit: 255, default: "", null: false
    t.string   "email",                  limit: 255, default: "", null: false
    t.string   "password_digest",        limit: 255, default: "", null: false
    t.string   "reset_password_token",   limit: 255
    t.datetime "reset_password_sent_at"
    t.datetime "remember_created_at"
    t.integer  "sign_in_count",          limit: 4,   default: 0
    t.datetime "current_sign_in_at"
    t.datetime "last_sign_in_at"
    t.string   "current_sign_in_ip",     limit: 255
    t.string   "last_sign_in_ip",        limit: 255
    t.string   "remember_token",         limit: 255
    t.datetime "created_at"
    t.datetime "updated_at"
    t.boolean  "super_admin",            limit: 1
  end

  create_table "albums", force: :cascade do |t|
    t.string   "name",        limit: 255
    t.boolean  "super_admin", limit: 1
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "annonce_account_favs", force: :cascade do |t|
    t.integer  "annonce_account_id", limit: 4
    t.integer  "annonce_id",         limit: 4
    t.datetime "created_at",                   null: false
    t.datetime "updated_at",                   null: false
  end

  add_index "annonce_account_favs", ["annonce_account_id"], name: "index_annonce_account_favs_on_annonce_account_id", using: :btree
  add_index "annonce_account_favs", ["annonce_id"], name: "index_annonce_account_favs_on_annonce_id", using: :btree

  create_table "annonce_account_newsgroups", force: :cascade do |t|
    t.integer  "annonce_account_id", limit: 4
    t.integer  "newsgroup_id",       limit: 4
    t.datetime "created_at",                   null: false
    t.datetime "updated_at",                   null: false
  end

  add_index "annonce_account_newsgroups", ["annonce_account_id"], name: "index_annonce_account_newsgroups_on_annonce_account_id", using: :btree
  add_index "annonce_account_newsgroups", ["newsgroup_id"], name: "index_annonce_account_newsgroups_on_newsgroup_id", using: :btree

  create_table "annonce_account_ribs", force: :cascade do |t|
    t.integer  "annonce_account_id", limit: 4
    t.string   "bank_name",          limit: 255
    t.string   "bank_city",          limit: 255
    t.string   "country",            limit: 255
    t.string   "name",               limit: 255
    t.string   "address",            limit: 255
    t.string   "address2",           limit: 255
    t.string   "cp",                 limit: 255
    t.string   "city",               limit: 255
    t.string   "iban",               limit: 255
    t.string   "bic",                limit: 255
    t.string   "tva_number",         limit: 255
    t.boolean  "tva",                limit: 1
    t.boolean  "enabled",            limit: 1
    t.boolean  "validated",          limit: 1
    t.datetime "validated_at"
    t.boolean  "archived",           limit: 1
    t.datetime "archived_at"
    t.string   "scan_file",          limit: 255
    t.datetime "created_at",                     null: false
    t.datetime "updated_at",                     null: false
  end

  add_index "annonce_account_ribs", ["annonce_account_id"], name: "index_annonce_account_ribs_on_annonce_account_id", using: :btree

  create_table "annonce_accounts", force: :cascade do |t|
    t.integer  "parent_id",               limit: 4
    t.boolean  "archived",                limit: 1
    t.boolean  "enabled",                 limit: 1
    t.string   "username",                limit: 255
    t.string   "name",                    limit: 255
    t.string   "firstname",               limit: 255
    t.string   "organisation",            limit: 255
    t.string   "siret",                   limit: 255
    t.text     "bio",                     limit: 65535
    t.string   "avatar",                  limit: 255
    t.string   "localisation",            limit: 255
    t.boolean  "pro",                     limit: 1,     default: false
    t.string   "token",                   limit: 255
    t.string   "address",                 limit: 255
    t.string   "address2",                limit: 255
    t.string   "cp",                      limit: 255
    t.string   "city",                    limit: 255
    t.string   "country",                 limit: 255
    t.string   "email",                   limit: 255,   default: "",    null: false
    t.string   "password_digest",         limit: 255,   default: "",    null: false
    t.string   "reset_password_token",    limit: 255
    t.datetime "reset_password_sent_at"
    t.datetime "remember_created_at"
    t.integer  "sign_in_count",           limit: 4,     default: 0
    t.datetime "current_sign_in_at"
    t.datetime "last_sign_in_at"
    t.string   "current_sign_in_ip",      limit: 255
    t.string   "last_sign_in_ip",         limit: 255
    t.boolean  "blocked",                 limit: 1
    t.datetime "blocked_at"
    t.datetime "created_at",                                            null: false
    t.datetime "updated_at",                                            null: false
    t.integer  "binary_side",             limit: 4
    t.integer  "binary_parent_id",        limit: 4
    t.integer  "binary_preferences",      limit: 4
    t.string   "mlm_token",               limit: 255
    t.integer  "left_binary_points",      limit: 4
    t.integer  "right_binary_points",     limit: 4
    t.string   "tel_number",              limit: 255
    t.string   "parent_code",             limit: 255
    t.boolean  "parent_at_create",        limit: 1
    t.string   "provider",                limit: 255
    t.string   "uid",                     limit: 255
    t.string   "facebook_token",          limit: 255
    t.string   "remote_ip",               limit: 255
    t.boolean  "facebook_on_create",      limit: 1
    t.datetime "deleted_at"
    t.integer  "facebook_friends_number", limit: 4
  end

  create_table "annonce_antiquities", force: :cascade do |t|
    t.integer  "create_year",    limit: 4
    t.string   "antiquity_type", limit: 255
    t.boolean  "signed",         limit: 1
    t.boolean  "original",       limit: 1
    t.boolean  "certificat",     limit: 1
    t.string   "artist_text",    limit: 255
    t.datetime "created_at",                 null: false
    t.datetime "updated_at",                 null: false
  end

  create_table "annonce_autos", force: :cascade do |t|
    t.integer  "annonce_id", limit: 4
    t.integer  "kms",        limit: 4
    t.string   "energie",    limit: 255
    t.integer  "cv",         limit: 4
    t.string   "bv",         limit: 255, default: ""
    t.boolean  "first_hand", limit: 1
    t.boolean  "gps",        limit: 1
    t.boolean  "fourmotion", limit: 1
    t.date     "year"
    t.boolean  "attelage",   limit: 1
    t.boolean  "clim",       limit: 1
    t.boolean  "bluetooth",  limit: 1
    t.datetime "created_at",                          null: false
    t.datetime "updated_at",                          null: false
    t.integer  "marque_id",  limit: 4
  end

  add_index "annonce_autos", ["annonce_id"], name: "index_annonce_autos_on_annonce_id", using: :btree

  create_table "annonce_campings", force: :cascade do |t|
    t.string   "bien_type",  limit: 255
    t.integer  "capacite",   limit: 4
    t.integer  "nbr_rooms",  limit: 4
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
  end

  create_table "annonce_caravs", force: :cascade do |t|
    t.string   "carav_type", limit: 255
    t.integer  "kms",        limit: 4
    t.string   "energie",    limit: 255
    t.date     "year"
    t.integer  "cv",         limit: 4
    t.string   "bv",         limit: 255
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
    t.integer  "marque_id",  limit: 4
  end

  create_table "annonce_cats", force: :cascade do |t|
    t.string   "name",             limit: 255
    t.string   "slug",             limit: 255
    t.integer  "position",         limit: 4
    t.boolean  "enabled",          limit: 1
    t.integer  "priority",         limit: 4
    t.integer  "parent_id",        limit: 4
    t.datetime "created_at",                   null: false
    t.datetime "updated_at",                   null: false
    t.string   "specific",         limit: 255
    t.boolean  "specific_enabled", limit: 1
  end

  create_table "annonce_draws", force: :cascade do |t|
    t.integer  "create_year", limit: 4
    t.boolean  "artist",      limit: 1
    t.boolean  "signed",      limit: 1
    t.boolean  "original",    limit: 1
    t.boolean  "certificat",  limit: 1
    t.string   "artist_text", limit: 255
    t.datetime "created_at",              null: false
    t.datetime "updated_at",              null: false
  end

  create_table "annonce_gites", force: :cascade do |t|
    t.string   "bien_type",  limit: 255
    t.integer  "capacite",   limit: 4
    t.integer  "nbr_rooms",  limit: 4
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
  end

  create_table "annonce_graphics", force: :cascade do |t|
    t.integer  "create_year",  limit: 4
    t.boolean  "artist",       limit: 1
    t.boolean  "signed",       limit: 1
    t.boolean  "original",     limit: 1
    t.boolean  "certificat",   limit: 1
    t.string   "support_type", limit: 255
    t.string   "artist_text",  limit: 255
    t.datetime "created_at",               null: false
    t.datetime "updated_at",               null: false
  end

  create_table "annonce_habs", force: :cascade do |t|
    t.integer  "offre_type",        limit: 4
    t.integer  "bien_type",         limit: 4
    t.string   "dpe",               limit: 255
    t.string   "ges",               limit: 255
    t.integer  "nbr_pieces",        limit: 4
    t.integer  "nbr_chambres",      limit: 4
    t.integer  "surface_habitable", limit: 4
    t.integer  "surface_terrain",   limit: 4
    t.integer  "nbr_niveaux",       limit: 4
    t.integer  "build_year",        limit: 4
    t.string   "chauffage_type",    limit: 255
    t.datetime "created_at",                    null: false
    t.datetime "updated_at",                    null: false
  end

  create_table "annonce_highs", force: :cascade do |t|
    t.string   "bien_type",  limit: 255
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
    t.integer  "marque_id",  limit: 4
  end

  create_table "annonce_hotels", force: :cascade do |t|
    t.string   "bien_type",  limit: 255
    t.integer  "capacite",   limit: 4
    t.integer  "nbr_rooms",  limit: 4
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
  end

  create_table "annonce_infs", force: :cascade do |t|
    t.string   "bien_type",  limit: 255
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
    t.integer  "marque_id",  limit: 4
  end

  create_table "annonce_messages", force: :cascade do |t|
    t.string   "title",             limit: 255
    t.text     "message",           limit: 65535
    t.string   "name",              limit: 255
    t.string   "tel",               limit: 255
    t.integer  "expediteur_id",     limit: 4
    t.string   "expediteur_mail",   limit: 255
    t.string   "destinataire_mail", limit: 255
    t.integer  "destinataire_id",   limit: 4
    t.integer  "annonce_id",        limit: 4
    t.boolean  "enabled",           limit: 1
    t.boolean  "readed",            limit: 1
    t.boolean  "read",              limit: 1
    t.datetime "created_at",                      null: false
    t.datetime "updated_at",                      null: false
    t.string   "remote_ip",         limit: 255
    t.integer  "parent_id",         limit: 4
    t.datetime "last_message_at"
  end

  add_index "annonce_messages", ["annonce_id"], name: "index_annonce_messages_on_annonce_id", using: :btree

  create_table "annonce_motos", force: :cascade do |t|
    t.string   "m_type",     limit: 255
    t.integer  "cylindree",  limit: 4
    t.integer  "kms",        limit: 4
    t.date     "year"
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
    t.integer  "marque_id",  limit: 4
  end

  create_table "annonce_nauts", force: :cascade do |t|
    t.string   "naut_type",  limit: 255
    t.date     "year"
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
  end

  create_table "annonce_nums", force: :cascade do |t|
    t.string   "bien_type",  limit: 255
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
  end

  create_table "annonce_offices", force: :cascade do |t|
    t.string   "offre_type", limit: 255
    t.string   "bien_type",  limit: 255
    t.integer  "surface",    limit: 4
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
  end

  create_table "annonce_option_logs", force: :cascade do |t|
    t.integer  "annonce_id",             limit: 4
    t.integer  "annonce_option_type_id", limit: 4
    t.integer  "cost",                   limit: 4
    t.string   "name",                   limit: 255
    t.integer  "periode",                limit: 4
    t.integer  "periode_type",           limit: 4
    t.datetime "created_at",                         null: false
    t.datetime "updated_at",                         null: false
  end

  add_index "annonce_option_logs", ["annonce_id"], name: "index_annonce_option_logs_on_annonce_id", using: :btree
  add_index "annonce_option_logs", ["annonce_option_type_id"], name: "index_annonce_option_logs_on_annonce_option_type_id", using: :btree

  create_table "annonce_option_types", force: :cascade do |t|
    t.string   "name",         limit: 255
    t.string   "slug",         limit: 255
    t.integer  "periode",      limit: 4
    t.integer  "periode_type", limit: 4
    t.integer  "cost",         limit: 4
    t.integer  "position",     limit: 4
    t.text     "description",  limit: 65535
    t.boolean  "enabled",      limit: 1
    t.datetime "created_at",                 null: false
    t.datetime "updated_at",                 null: false
  end

  create_table "annonce_pdvs", force: :cascade do |t|
    t.string   "bien_type",  limit: 255
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
    t.integer  "marque_id",  limit: 4
  end

  create_table "annonce_pets", force: :cascade do |t|
    t.string   "bien_type",  limit: 255
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
  end

  create_table "annonce_photos", force: :cascade do |t|
    t.integer  "annonce_id",  limit: 4
    t.string   "file",        limit: 255
    t.string   "title",       limit: 255
    t.boolean  "enabled",     limit: 1
    t.boolean  "moderated",   limit: 1
    t.integer  "position",    limit: 4
    t.datetime "created_at",              null: false
    t.datetime "updated_at",              null: false
    t.boolean  "deleted",     limit: 1
    t.integer  "modo_id",     limit: 4
    t.boolean  "notified",    limit: 1
    t.boolean  "re_modo",     limit: 1
    t.datetime "notified_at"
    t.datetime "modo_at"
  end

  add_index "annonce_photos", ["annonce_id"], name: "index_annonce_photos_on_annonce_id", using: :btree

  create_table "annonce_plays", force: :cascade do |t|
    t.string   "bien_type",  limit: 255
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
    t.integer  "marque_id",  limit: 4
  end

  create_table "annonce_sculptures", force: :cascade do |t|
    t.integer  "create_year", limit: 4
    t.boolean  "artist",      limit: 1
    t.boolean  "signed",      limit: 1
    t.boolean  "original",    limit: 1
    t.boolean  "certificat",  limit: 1
    t.string   "artist_text", limit: 255
    t.datetime "created_at",              null: false
    t.datetime "updated_at",              null: false
  end

  create_table "annonce_tag_cats", force: :cascade do |t|
    t.integer  "annonce_id", limit: 4
    t.integer  "tag_cat_id", limit: 4
    t.datetime "created_at",           null: false
    t.datetime "updated_at",           null: false
  end

  add_index "annonce_tag_cats", ["annonce_id"], name: "index_annonce_tag_cats_on_annonce_id", using: :btree
  add_index "annonce_tag_cats", ["tag_cat_id"], name: "index_annonce_tag_cats_on_tag_cat_id", using: :btree

  create_table "annonce_tels", force: :cascade do |t|
    t.datetime "created_at",           null: false
    t.datetime "updated_at",           null: false
    t.integer  "marque_id",  limit: 4
  end

  create_table "annonce_utils", force: :cascade do |t|
    t.string   "util_type",  limit: 255
    t.integer  "kms",        limit: 4
    t.string   "energie",    limit: 255
    t.date     "year"
    t.integer  "cv",         limit: 4
    t.string   "bv",         limit: 255
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
    t.integer  "marque_id",  limit: 4
  end

  create_table "annonces", force: :cascade do |t|
    t.string   "title",                 limit: 255
    t.string   "slug",                  limit: 255
    t.integer  "annonce_account_id",    limit: 4
    t.string   "city_id",               limit: 255
    t.string   "city_slug",             limit: 255
    t.string   "cp",                    limit: 255
    t.string   "dpt",                   limit: 255
    t.string   "nom_departement",       limit: 255
    t.string   "nom_region",            limit: 255
    t.integer  "default_photo_id",      limit: 4
    t.integer  "revisiontodisplay",     limit: 4
    t.text     "content",               limit: 65535
    t.string   "refused",               limit: 255
    t.text     "content_moderated",     limit: 65535
    t.decimal  "price",                               precision: 10, scale: 2
    t.integer  "annonce_cat_id",        limit: 4
    t.datetime "expire_after"
    t.string   "moderated",             limit: 255
    t.string   "enabled",               limit: 255
    t.datetime "created_at",                                                               null: false
    t.datetime "updated_at",                                                               null: false
    t.integer  "specific_annonce_id",   limit: 4
    t.string   "specific_annonce_type", limit: 255
    t.integer  "nbr_photos",            limit: 4
    t.boolean  "highlight",             limit: 1
    t.date     "highlight_expire"
    t.boolean  "big_annonce",           limit: 1
    t.date     "big_annonce_expire"
    t.date     "list_date"
    t.boolean  "left_annonce",          limit: 1
    t.date     "left_annonce_expire"
    t.boolean  "urgent",                limit: 1
    t.date     "urgent_expire"
    t.date     "published_date"
    t.boolean  "published",             limit: 1
    t.datetime "list_head"
    t.string   "tel_number",            limit: 255
    t.boolean  "tel",                   limit: 1
    t.integer  "etat_id",               limit: 4
    t.string   "mail",                  limit: 255
    t.boolean  "internet",              limit: 1
    t.boolean  "video",                 limit: 1
    t.boolean  "link",                  limit: 1
    t.string   "video_url",             limit: 255
    t.string   "video_title",           limit: 255
    t.string   "link_url",              limit: 255
    t.string   "link_title",            limit: 255
    t.string   "g_postal_code",         limit: 255
    t.string   "g_city",                limit: 255
    t.string   "g_sub_state",           limit: 255
    t.string   "g_sub_state_code",      limit: 255
    t.string   "g_state",               limit: 255
    t.string   "g_state_code",          limit: 255
    t.string   "g_country",             limit: 255
    t.string   "g_country_code",        limit: 255
    t.string   "g_text",                limit: 255
    t.decimal  "g_latitude",                          precision: 10, scale: 6
    t.decimal  "g_longitude",                         precision: 10, scale: 6
    t.integer  "devise_id",             limit: 4,                              default: 1
    t.decimal  "universal_price",                     precision: 10, scale: 2
    t.boolean  "frontpage",             limit: 1
    t.integer  "annonce_style_id",      limit: 4,                              default: 1
  end

  add_index "annonces", ["annonce_account_id"], name: "index_annonces_on_annonce_account_id", using: :btree
  add_index "annonces", ["annonce_cat_id"], name: "index_annonces_on_annonce_cat_id", using: :btree
  add_index "annonces", ["devise_id"], name: "index_annonces_on_devise_id", using: :btree

  create_table "archive_newsletters", force: :cascade do |t|
    t.integer  "newsletter_id", limit: 4
    t.string   "title",         limit: 255
    t.text     "content",       limit: 65535
    t.string   "email_from",    limit: 255
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "archive_newsletters", ["newsletter_id"], name: "index_archive_newsletters_on_newsletter_id", using: :btree

  create_table "articles", force: :cascade do |t|
    t.datetime "published_at"
    t.string   "title",           limit: 255
    t.string   "slug",            limit: 255
    t.string   "tag",             limit: 255
    t.text     "description",     limit: 65535
    t.text     "keywords",        limit: 65535
    t.boolean  "enabled",         limit: 1
    t.integer  "image_file_id",   limit: 4
    t.boolean  "title_cached",    limit: 1
    t.string   "tags_cache",      limit: 255
    t.string   "tags_cache_slug", limit: 255
    t.integer  "category_id",     limit: 4
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "binary_points", force: :cascade do |t|
    t.integer  "value",              limit: 4
    t.integer  "side",               limit: 4
    t.integer  "annonce_account_id", limit: 4
    t.integer  "fileul_id",          limit: 4
    t.integer  "order_id",           limit: 4
    t.boolean  "canceled",           limit: 1
    t.datetime "canceled_at"
    t.integer  "point_type",         limit: 4
    t.datetime "created_at",                   null: false
    t.datetime "updated_at",                   null: false
    t.integer  "canceled_id",        limit: 4
    t.integer  "commission_id",      limit: 4
  end

  add_index "binary_points", ["annonce_account_id"], name: "index_binary_points_on_annonce_account_id", using: :btree
  add_index "binary_points", ["order_id"], name: "index_binary_points_on_order_id", using: :btree

  create_table "black_list_ips", force: :cascade do |t|
    t.string   "remote_ip",  limit: 255
    t.boolean  "enabled",    limit: 1
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
  end

  create_table "block_contents", force: :cascade do |t|
    t.integer  "style",            limit: 4
    t.integer  "nbr_columns",      limit: 4
    t.integer  "row1",             limit: 4
    t.integer  "row2",             limit: 4
    t.integer  "row3",             limit: 4
    t.integer  "row4",             limit: 4
    t.datetime "created_at"
    t.datetime "updated_at"
    t.integer  "image_file_id",    limit: 4
    t.integer  "margin_top",       limit: 4
    t.integer  "margin_bottom",    limit: 4
    t.integer  "margin_left",      limit: 4
    t.integer  "margin_right",     limit: 4
    t.integer  "padding_top",      limit: 4
    t.integer  "padding_bottom",   limit: 4
    t.integer  "padding_left",     limit: 4
    t.integer  "padding_right",    limit: 4
    t.boolean  "parallax",         limit: 1
    t.boolean  "center",           limit: 1
    t.integer  "center_width",     limit: 4
    t.string   "background_color", limit: 255
    t.string   "gradient_start",   limit: 255
    t.string   "gradient_stop",    limit: 255
  end

  add_index "block_contents", ["image_file_id"], name: "index_block_contents_on_image_file_id", using: :btree

  create_table "blocks", force: :cascade do |t|
    t.string   "block_name",     limit: 255
    t.string   "blockable_type", limit: 255
    t.integer  "blockable_id",   limit: 4
    t.text     "content",        limit: 65535
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "break_contents", force: :cascade do |t|
    t.boolean  "line",       limit: 1
    t.integer  "height",     limit: 4
    t.string   "style",      limit: 255
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "categories", force: :cascade do |t|
    t.string   "name",          limit: 255
    t.string   "slug",          limit: 255
    t.boolean  "enabled",       limit: 1
    t.text     "description",   limit: 65535
    t.integer  "image_file_id", limit: 4
    t.integer  "position",      limit: 4
    t.integer  "parent_id",     limit: 4
    t.string   "permalink",     limit: 255
    t.boolean  "front_page",    limit: 1
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "cel_tables", force: :cascade do |t|
    t.integer  "position",         limit: 4
    t.integer  "style",            limit: 4
    t.integer  "table_row_id",     limit: 4
    t.integer  "table_content_id", limit: 4
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "cities", force: :cascade do |t|
    t.string   "eu_circo",               limit: 255
    t.string   "code_region",            limit: 255
    t.string   "nom_region",             limit: 255
    t.string   "chef_lieu_region",       limit: 255
    t.string   "numero_departement",     limit: 255
    t.string   "nom_departement",        limit: 255
    t.string   "prefecture",             limit: 255
    t.string   "numero_circonscription", limit: 255
    t.string   "nom_commune",            limit: 255
    t.string   "codes_postaux",          limit: 255
    t.string   "code_insee",             limit: 255
    t.float    "lat",                    limit: 24
    t.float    "lng",                    limit: 24
    t.float    "eloignement",            limit: 24
    t.datetime "created_at",                         null: false
    t.datetime "updated_at",                         null: false
  end

  create_table "comments", force: :cascade do |t|
    t.string   "pseudo",           limit: 255,   default: ""
    t.string   "email",            limit: 255,   default: ""
    t.string   "website",          limit: 255,   default: ""
    t.boolean  "enabled",          limit: 1
    t.text     "comment",          limit: 65535
    t.integer  "commentable_id",   limit: 4
    t.string   "commentable_type", limit: 255
    t.integer  "user_id",          limit: 4
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "commissions", force: :cascade do |t|
    t.integer  "annonce_account_id", limit: 4
    t.decimal  "amount",                       precision: 10, scale: 2
    t.boolean  "canceled",           limit: 1
    t.datetime "canceled_at"
    t.integer  "commission_type_id", limit: 4
    t.integer  "order_id",           limit: 4
    t.datetime "created_at",                                            null: false
    t.datetime "updated_at",                                            null: false
    t.integer  "canceled_id",        limit: 4
    t.integer  "binary_point_id",    limit: 4
    t.integer  "count_part_com_id",  limit: 4
    t.decimal  "percent",                      precision: 10, scale: 2
    t.integer  "generation",         limit: 4
    t.integer  "devise_id",          limit: 4
  end

  add_index "commissions", ["annonce_account_id"], name: "index_commissions_on_annonce_account_id", using: :btree
  add_index "commissions", ["count_part_com_id"], name: "index_commissions_on_count_part_com_id", using: :btree
  add_index "commissions", ["devise_id"], name: "index_commissions_on_devise_id", using: :btree

  create_table "count_part_coms", force: :cascade do |t|
    t.datetime "last_day"
    t.boolean  "paid",           limit: 1
    t.datetime "paid_at"
    t.decimal  "amount",                   precision: 10, scale: 2
    t.integer  "nbr_parts",      limit: 4
    t.decimal  "part_price",               precision: 10, scale: 2
    t.decimal  "control_amount",           precision: 10, scale: 2
    t.datetime "created_at",                                        null: false
    t.datetime "updated_at",                                        null: false
    t.integer  "devise_id",      limit: 4
  end

  add_index "count_part_coms", ["devise_id"], name: "index_count_part_coms_on_devise_id", using: :btree

  create_table "credit_expenses", force: :cascade do |t|
    t.integer  "value",              limit: 4
    t.integer  "credit_id",          limit: 4
    t.integer  "expense_id",         limit: 4
    t.integer  "annonce_account_id", limit: 4
    t.datetime "created_at",                   null: false
    t.datetime "updated_at",                   null: false
  end

  add_index "credit_expenses", ["annonce_account_id"], name: "index_credit_expenses_on_annonce_account_id", using: :btree
  add_index "credit_expenses", ["credit_id"], name: "index_credit_expenses_on_credit_id", using: :btree
  add_index "credit_expenses", ["expense_id"], name: "index_credit_expenses_on_expense_id", using: :btree

  create_table "credit_products", force: :cascade do |t|
    t.string   "name",              limit: 255
    t.text     "description",       limit: 65535
    t.integer  "nbr_credits",       limit: 4
    t.integer  "validity",          limit: 4
    t.decimal  "price_ht",                        precision: 10, scale: 2
    t.integer  "binary_points",     limit: 4
    t.integer  "binary_percentage", limit: 4
    t.datetime "created_at",                                               null: false
    t.datetime "updated_at",                                               null: false
    t.integer  "parts",             limit: 4
    t.integer  "devise_id",         limit: 4
  end

  add_index "credit_products", ["devise_id"], name: "index_credit_products_on_devise_id", using: :btree

  create_table "credits", force: :cascade do |t|
    t.integer  "annonce_account_id", limit: 4
    t.boolean  "cred",               limit: 1
    t.boolean  "debt",               limit: 1
    t.integer  "value",              limit: 4
    t.date     "expire_after"
    t.text     "note",               limit: 65535
    t.integer  "operation_id",       limit: 4
    t.string   "operation_type",     limit: 255
    t.boolean  "mlm",                limit: 1
    t.datetime "created_at",                       null: false
    t.datetime "updated_at",                       null: false
  end

  add_index "credits", ["annonce_account_id"], name: "index_credits_on_annonce_account_id", using: :btree

  create_table "data_files", force: :cascade do |t|
    t.string   "file",           limit: 255
    t.string   "name",           limit: 255
    t.string   "slug",           limit: 255
    t.string   "token",          limit: 255
    t.string   "description",    limit: 255
    t.integer  "file_folder_id", limit: 4
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "departements", force: :cascade do |t|
    t.string   "slug",            limit: 255
    t.string   "nom_departement", limit: 255
    t.string   "code",            limit: 255
    t.integer  "id_region",       limit: 4
    t.datetime "created_at",                  null: false
    t.datetime "updated_at",                  null: false
  end

  create_table "devises", force: :cascade do |t|
    t.string   "name",        limit: 255
    t.string   "icon",        limit: 255
    t.string   "code",        limit: 255
    t.decimal  "rate",                    precision: 10, scale: 2
    t.string   "text_format", limit: 255
    t.datetime "created_at",                                       null: false
    t.datetime "updated_at",                                       null: false
    t.boolean  "orderable",   limit: 1
  end

  create_table "download_contents", force: :cascade do |t|
    t.string   "title",        limit: 255
    t.string   "style",        limit: 255
    t.text     "description",  limit: 65535
    t.integer  "data_file_id", limit: 4
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "dynamic_contents", force: :cascade do |t|
    t.string   "name",       limit: 255
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "etrans_histories", force: :cascade do |t|
    t.integer  "order_id",   limit: 4
    t.string   "M",          limit: 255
    t.string   "R",          limit: 255
    t.string   "T",          limit: 255
    t.string   "A",          limit: 255
    t.string   "B",          limit: 255
    t.string   "C",          limit: 255
    t.string   "D",          limit: 255
    t.string   "E",          limit: 255
    t.string   "F",          limit: 255
    t.string   "G",          limit: 255
    t.string   "H",          limit: 255
    t.string   "I",          limit: 255
    t.string   "J",          limit: 255
    t.string   "K",          limit: 255
    t.string   "N",          limit: 255
    t.string   "O",          limit: 255
    t.string   "P",          limit: 255
    t.string   "Q",          limit: 255
    t.string   "S",          limit: 255
    t.string   "U",          limit: 255
    t.string   "W",          limit: 255
    t.string   "Y",          limit: 255
    t.string   "Z",          limit: 255
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
  end

  add_index "etrans_histories", ["order_id"], name: "index_etrans_histories_on_order_id", using: :btree

  create_table "expenses", force: :cascade do |t|
    t.integer  "value",              limit: 4
    t.text     "note",               limit: 65535
    t.integer  "annonce_account_id", limit: 4
    t.datetime "created_at",                       null: false
    t.datetime "updated_at",                       null: false
    t.string   "piece_type",         limit: 255
    t.integer  "piece_id",           limit: 4
  end

  add_index "expenses", ["annonce_account_id"], name: "index_expenses_on_annonce_account_id", using: :btree

  create_table "external_links", force: :cascade do |t|
    t.string   "title",       limit: 255
    t.text     "description", limit: 65535
    t.string   "url",         limit: 255
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "file_folders", force: :cascade do |t|
    t.string   "name",        limit: 255
    t.boolean  "super_admin", limit: 1
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "gallery_contents", force: :cascade do |t|
    t.string   "name",        limit: 255
    t.text     "description", limit: 65535
    t.integer  "style",       limit: 4
    t.integer  "nbr_img",     limit: 4
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "gallery_images", force: :cascade do |t|
    t.string   "title",              limit: 255
    t.text     "description",        limit: 65535
    t.string   "tags",               limit: 255
    t.integer  "position",           limit: 4
    t.integer  "image_file_id",      limit: 4
    t.integer  "gallery_content_id", limit: 4
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "hipay_countries", force: :cascade do |t|
    t.string   "code_pays",    limit: 255
    t.string   "nom_pays",     limit: 255
    t.boolean  "ongoing_gafi", limit: 1
    t.boolean  "gafi",         limit: 1
    t.boolean  "embargo",      limit: 1
    t.boolean  "enabled",      limit: 1
    t.datetime "created_at",               null: false
    t.datetime "updated_at",               null: false
  end

  create_table "hipay_histories", force: :cascade do |t|
    t.integer  "order_id",               limit: 4
    t.string   "operation",              limit: 255
    t.string   "status",                 limit: 255
    t.datetime "transaction_date"
    t.decimal  "origamount",                         precision: 15, scale: 10
    t.string   "origcurrency",           limit: 255
    t.integer  "idformerchant",          limit: 4
    t.string   "emailclient",            limit: 255
    t.string   "idclient",               limit: 255
    t.string   "merchantdatas",          limit: 255
    t.string   "cardcountry",            limit: 255
    t.string   "ipcountry",              limit: 255
    t.string   "transid",                limit: 255
    t.string   "is3ds",                  limit: 255
    t.string   "paymentmethod",          limit: 255
    t.string   "customercountry",        limit: 255
    t.string   "returncode",             limit: 255
    t.string   "returndescriptionshort", limit: 255
    t.string   "returndescriptionlong",  limit: 255
    t.datetime "created_at",                                                   null: false
    t.datetime "updated_at",                                                   null: false
  end

  add_index "hipay_histories", ["order_id"], name: "index_hipay_histories_on_order_id", using: :btree

  create_table "hipay_virement_histories", force: :cascade do |t|
    t.string   "transaction_id",     limit: 255
    t.string   "amount",             limit: 255
    t.string   "currency",           limit: 255
    t.string   "recipient_username", limit: 255
    t.string   "public_label",       limit: 255
    t.string   "private_label",      limit: 255
    t.string   "code",               limit: 255
    t.string   "description",        limit: 255
    t.boolean  "success",            limit: 1
    t.integer  "hipay_virement_id",  limit: 4
    t.datetime "created_at",                     null: false
    t.datetime "updated_at",                     null: false
  end

  add_index "hipay_virement_histories", ["hipay_virement_id"], name: "index_hipay_virement_histories_on_hipay_virement_id", using: :btree

  create_table "hipay_virements", force: :cascade do |t|
    t.string   "hipay_email",        limit: 255
    t.boolean  "confirmed",          limit: 1
    t.boolean  "sended",             limit: 1
    t.datetime "sended_at"
    t.integer  "devise_id",          limit: 4
    t.string   "token",              limit: 255
    t.string   "note",               limit: 255
    t.boolean  "done",               limit: 1
    t.integer  "annonce_account_id", limit: 4
    t.decimal  "tva",                            precision: 10, scale: 2
    t.decimal  "frais",                          precision: 10, scale: 2
    t.decimal  "solde",                          precision: 10, scale: 2
    t.decimal  "amount_ht",                      precision: 10, scale: 2
    t.decimal  "amount_ttc",                     precision: 10, scale: 2
    t.integer  "commission_id",      limit: 4
    t.datetime "created_at",                                              null: false
    t.datetime "updated_at",                                              null: false
  end

  add_index "hipay_virements", ["annonce_account_id"], name: "index_hipay_virements_on_annonce_account_id", using: :btree
  add_index "hipay_virements", ["commission_id"], name: "index_hipay_virements_on_commission_id", using: :btree
  add_index "hipay_virements", ["devise_id"], name: "index_hipay_virements_on_devise_id", using: :btree

  create_table "html_contents", force: :cascade do |t|
    t.text     "content",      limit: 65535
    t.string   "style",        limit: 255
    t.string   "content_type", limit: 255
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "image_contents", force: :cascade do |t|
    t.integer  "image_file_id", limit: 4
    t.integer  "width",         limit: 4
    t.integer  "height",        limit: 4
    t.string   "alignement",    limit: 255
    t.boolean  "expandable",    limit: 1
    t.string   "style",         limit: 255
    t.string   "alt",           limit: 255
    t.integer  "cible_id",      limit: 4
    t.string   "cible_type",    limit: 255
    t.boolean  "with_cible",    limit: 1
    t.boolean  "popup",         limit: 1
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "image_files", force: :cascade do |t|
    t.string   "file",        limit: 255
    t.string   "name",        limit: 255
    t.string   "slug",        limit: 255
    t.text     "description", limit: 65535
    t.string   "tags",        limit: 255
    t.integer  "album_id",    limit: 4
    t.string   "photograph",  limit: 255
    t.string   "cible_type",  limit: 255
    t.integer  "cible_id",    limit: 4
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "ip_histories", force: :cascade do |t|
    t.string   "remote_ip",          limit: 255
    t.string   "country",            limit: 255
    t.string   "city",               limit: 255
    t.decimal  "latitude",                       precision: 10, scale: 6
    t.decimal  "longitude",                      precision: 10, scale: 6
    t.integer  "element_id",         limit: 4
    t.string   "element_type",       limit: 255
    t.integer  "annonce_account_id", limit: 4
    t.datetime "created_at",                                              null: false
    t.datetime "updated_at",                                              null: false
  end

  create_table "link_contents", force: :cascade do |t|
    t.integer  "type",       limit: 4
    t.string   "name",       limit: 255
    t.string   "title",      limit: 255
    t.boolean  "popup",      limit: 1
    t.string   "url",        limit: 255
    t.string   "style",      limit: 255
    t.integer  "cible_id",   limit: 4
    t.string   "cible_type", limit: 255
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "mail_archives", force: :cascade do |t|
    t.integer  "newsletter_id",         limit: 4
    t.integer  "archive_newsletter_id", limit: 4
    t.string   "email",                 limit: 255
    t.integer  "annonce_account_id",    limit: 4
    t.string   "token",                 limit: 255
    t.boolean  "readed",                limit: 1
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "mail_archives", ["annonce_account_id"], name: "index_mail_archives_on_annonce_account_id", using: :btree
  add_index "mail_archives", ["archive_newsletter_id"], name: "index_mail_archives_on_archive_newsletter_id", using: :btree
  add_index "mail_archives", ["newsletter_id"], name: "index_mail_archives_on_newsletter_id", using: :btree

  create_table "map_contents", force: :cascade do |t|
    t.string   "address",    limit: 255
    t.string   "name",       limit: 255
    t.integer  "view",       limit: 4
    t.boolean  "info_bule",  limit: 1
    t.integer  "zoom",       limit: 4
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "marques", force: :cascade do |t|
    t.string   "name",           limit: 255
    t.string   "slug",           limit: 255
    t.text     "description",    limit: 65535
    t.integer  "annonce_cat_id", limit: 4
    t.boolean  "fav",            limit: 1
    t.string   "marque_type",    limit: 255
    t.datetime "created_at",                   null: false
    t.datetime "updated_at",                   null: false
  end

  add_index "marques", ["annonce_cat_id"], name: "index_marques_on_annonce_cat_id", using: :btree

  create_table "menu_aliases", force: :cascade do |t|
    t.integer  "menu_item_id", limit: 4
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "menu_items", force: :cascade do |t|
    t.string   "name",              limit: 255
    t.string   "slug",              limit: 255
    t.string   "permalink",         limit: 255
    t.string   "section_name",      limit: 255
    t.integer  "section_id",        limit: 4
    t.string   "repertoire_name",   limit: 255
    t.integer  "repertoire_id",     limit: 4
    t.integer  "parent_id",         limit: 4
    t.integer  "position",          limit: 4
    t.boolean  "super_admin",       limit: 1
    t.boolean  "enabled",           limit: 1
    t.boolean  "visible",           limit: 1
    t.boolean  "deleted",           limit: 1
    t.integer  "menu_id",           limit: 4
    t.integer  "menu_content_id",   limit: 4
    t.string   "menu_content_type", limit: 255
    t.integer  "archive_id",        limit: 4
    t.boolean  "archived",          limit: 1
    t.datetime "archived_at"
    t.boolean  "password",          limit: 1
    t.boolean  "comment",           limit: 1
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "menu_urls", force: :cascade do |t|
    t.string   "url",        limit: 255
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "menus", force: :cascade do |t|
    t.string   "name",       limit: 255
    t.string   "max_levels", limit: 255
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "mlm_points", force: :cascade do |t|
    t.integer  "annonce_account_id", limit: 4
    t.boolean  "cred",               limit: 1
    t.boolean  "debt",               limit: 1
    t.integer  "value",              limit: 4
    t.string   "note",               limit: 255
    t.integer  "operation_id",       limit: 4
    t.string   "operation_type",     limit: 255
    t.datetime "created_at",                     null: false
    t.datetime "updated_at",                     null: false
  end

  add_index "mlm_points", ["annonce_account_id"], name: "index_mlm_points_on_annonce_account_id", using: :btree

  create_table "newsgroups", force: :cascade do |t|
    t.string   "name",            limit: 255
    t.string   "slug",            limit: 255
    t.boolean  "default_checked", limit: 1
    t.boolean  "enabled",         limit: 1
    t.datetime "created_at",                  null: false
    t.datetime "updated_at",                  null: false
  end

  create_table "newsletters", force: :cascade do |t|
    t.string   "title",      limit: 255
    t.text     "content",    limit: 65535
    t.datetime "sendmail"
    t.boolean  "archive",    limit: 1
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "orders", force: :cascade do |t|
    t.integer  "annonce_account_id",   limit: 4
    t.integer  "credit_product_id",    limit: 4
    t.datetime "paid_at"
    t.boolean  "paid",                 limit: 1
    t.boolean  "unpaid",               limit: 1
    t.datetime "unpaid_at"
    t.integer  "payment_type_id",      limit: 4
    t.string   "reduction_code",       limit: 255
    t.integer  "reduction_percentage", limit: 4
    t.decimal  "reduction_value",                    precision: 10, scale: 2
    t.decimal  "amount_ht",                          precision: 10, scale: 2
    t.decimal  "amount_ttc",                         precision: 10, scale: 2
    t.string   "name",                 limit: 255
    t.text     "description",          limit: 65535
    t.integer  "nbr_credits",          limit: 4
    t.integer  "validity",             limit: 4
    t.decimal  "price_ht",                           precision: 10, scale: 2
    t.integer  "binary_points",        limit: 4
    t.integer  "binary_percentage",    limit: 4
    t.string   "username",             limit: 255
    t.string   "firstname",            limit: 255
    t.string   "organisation",         limit: 255
    t.string   "siret",                limit: 255
    t.string   "address",              limit: 255
    t.string   "address2",             limit: 255
    t.string   "cp",                   limit: 255
    t.string   "city",                 limit: 255
    t.string   "country",              limit: 255
    t.string   "tva_intra",            limit: 255
    t.boolean  "pro",                  limit: 1,                              default: false
    t.boolean  "cgv",                  limit: 1
    t.boolean  "retractation",         limit: 1
    t.boolean  "troisd",               limit: 1
    t.datetime "created_at",                                                                  null: false
    t.datetime "updated_at",                                                                  null: false
    t.integer  "nbr_parts",            limit: 4
    t.integer  "bill_id",              limit: 4
    t.string   "bill_number",          limit: 255
    t.datetime "bill_at"
    t.boolean  "demande_rbt",          limit: 1
    t.string   "bill_token",           limit: 255
    t.boolean  "with_com",             limit: 1
    t.decimal  "com_amount",                         precision: 10, scale: 2
    t.integer  "commission_id",        limit: 4
    t.integer  "devise_id",            limit: 4
  end

  add_index "orders", ["annonce_account_id"], name: "index_orders_on_annonce_account_id", using: :btree
  add_index "orders", ["credit_product_id"], name: "index_orders_on_credit_product_id", using: :btree
  add_index "orders", ["devise_id"], name: "index_orders_on_devise_id", using: :btree

  create_table "pages", force: :cascade do |t|
    t.text     "title",       limit: 65535
    t.text     "description", limit: 65535
    t.text     "keywords",    limit: 65535
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "portlets", force: :cascade do |t|
    t.integer  "block_id",     limit: 4
    t.integer  "content_id",   limit: 4
    t.string   "content_type", limit: 255
    t.integer  "position",     limit: 4
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "quote_contents", force: :cascade do |t|
    t.text     "quote",      limit: 65535
    t.string   "author",     limit: 255
    t.string   "color",      limit: 255
    t.string   "background", limit: 255
    t.string   "style",      limit: 255
    t.datetime "created_at",               null: false
    t.datetime "updated_at",               null: false
  end

  create_table "regions", force: :cascade do |t|
    t.string   "nom_region", limit: 255
    t.string   "slug",       limit: 255
    t.datetime "created_at",             null: false
    t.datetime "updated_at",             null: false
  end

  create_table "sessions", force: :cascade do |t|
    t.string   "session_id", limit: 255,   null: false
    t.text     "data",       limit: 65535
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  add_index "sessions", ["updated_at"], name: "index_sessions_on_updated_at", using: :btree

  create_table "table_contents", force: :cascade do |t|
    t.integer  "style",      limit: 4
    t.integer  "nbr_rows",   limit: 4
    t.integer  "nbr_cols",   limit: 4
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "table_rows", force: :cascade do |t|
    t.integer  "position",         limit: 4
    t.integer  "style",            limit: 4
    t.integer  "table_content_id", limit: 4
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "tag_cats", force: :cascade do |t|
    t.string   "name",           limit: 255
    t.string   "slug",           limit: 255
    t.integer  "annonce_cat_id", limit: 4
    t.boolean  "enabled",        limit: 1
    t.datetime "created_at",                 null: false
    t.datetime "updated_at",                 null: false
  end

  add_index "tag_cats", ["annonce_cat_id"], name: "index_tag_cats_on_annonce_cat_id", using: :btree

  create_table "tag_taggables", force: :cascade do |t|
    t.string   "taggable_type", limit: 255
    t.integer  "taggable_id",   limit: 4
    t.integer  "tag_id",        limit: 4
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "tags", force: :cascade do |t|
    t.string   "name",          limit: 255
    t.string   "slug",          limit: 255
    t.integer  "parent_id",     limit: 4
    t.boolean  "public",        limit: 1
    t.string   "taggable_type", limit: 255
    t.integer  "taggable_id",   limit: 4
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "text_contents", force: :cascade do |t|
    t.string   "style",      limit: 255
    t.text     "content",    limit: 65535
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "title_contents", force: :cascade do |t|
    t.text     "content",    limit: 65535
    t.integer  "level",      limit: 4
    t.string   "style",      limit: 255
    t.datetime "created_at"
    t.datetime "updated_at"
    t.string   "alignement", limit: 255
  end

  create_table "translations", force: :cascade do |t|
    t.string   "locale",         limit: 255
    t.string   "key",            limit: 255
    t.text     "value",          limit: 65535
    t.text     "interpolations", limit: 65535
    t.boolean  "is_proc",        limit: 1,     default: false
    t.datetime "created_at"
    t.datetime "updated_at"
  end

  create_table "virement_remises", force: :cascade do |t|
    t.string   "token",            limit: 255
    t.decimal  "amount",                       precision: 10, scale: 2
    t.integer  "virement_type_id", limit: 4
    t.boolean  "sended",           limit: 1
    t.boolean  "confirmed",        limit: 1
    t.string   "note",             limit: 255
    t.datetime "created_at",                                            null: false
    t.datetime "updated_at",                                            null: false
    t.integer  "devise_id",        limit: 4
  end

  add_index "virement_remises", ["devise_id"], name: "index_virement_remises_on_devise_id", using: :btree

  create_table "virements", force: :cascade do |t|
    t.string   "token",                  limit: 255
    t.integer  "virement_type_id",       limit: 4
    t.boolean  "sended",                 limit: 1
    t.boolean  "confirmed",              limit: 1
    t.boolean  "done",                   limit: 1
    t.string   "note",                   limit: 255
    t.integer  "annonce_account_id",     limit: 4
    t.integer  "virement_remise_id",     limit: 4
    t.decimal  "amount_ht",                          precision: 10, scale: 2
    t.decimal  "amount_ttc",                         precision: 10, scale: 2
    t.decimal  "tva",                                precision: 10, scale: 2
    t.decimal  "frais",                              precision: 10
    t.decimal  "solde",                              precision: 10
    t.integer  "commission_id",          limit: 4
    t.integer  "annonce_account_rib_id", limit: 4
    t.datetime "created_at",                                                  null: false
    t.datetime "updated_at",                                                  null: false
    t.integer  "devise_id",              limit: 4
  end

  add_index "virements", ["annonce_account_id"], name: "index_virements_on_annonce_account_id", using: :btree
  add_index "virements", ["annonce_account_rib_id"], name: "index_virements_on_annonce_account_rib_id", using: :btree
  add_index "virements", ["commission_id"], name: "index_virements_on_commission_id", using: :btree
  add_index "virements", ["devise_id"], name: "index_virements_on_devise_id", using: :btree
  add_index "virements", ["virement_remise_id"], name: "index_virements_on_virement_remise_id", using: :btree

  add_foreign_key "annonce_account_favs", "annonce_accounts"
  add_foreign_key "annonce_account_favs", "annonces"
  add_foreign_key "annonce_account_newsgroups", "annonce_accounts"
  add_foreign_key "annonce_account_newsgroups", "newsgroups"
  add_foreign_key "annonce_account_ribs", "annonce_accounts"
  add_foreign_key "annonce_autos", "annonces"
  add_foreign_key "annonce_messages", "annonces"
  add_foreign_key "annonce_option_logs", "annonce_option_types"
  add_foreign_key "annonce_option_logs", "annonces"
  add_foreign_key "annonce_photos", "annonces"
  add_foreign_key "annonce_tag_cats", "annonces"
  add_foreign_key "annonce_tag_cats", "tag_cats"
  add_foreign_key "binary_points", "annonce_accounts"
  add_foreign_key "binary_points", "orders"
  add_foreign_key "block_contents", "image_files"
  add_foreign_key "commissions", "annonce_accounts"
  add_foreign_key "commissions", "count_part_coms"
  add_foreign_key "commissions", "devises"
  add_foreign_key "count_part_coms", "devises"
  add_foreign_key "credit_expenses", "credits"
  add_foreign_key "credit_expenses", "expenses"
  add_foreign_key "credit_products", "devises"
  add_foreign_key "etrans_histories", "orders"
  add_foreign_key "hipay_histories", "orders"
  add_foreign_key "hipay_virement_histories", "hipay_virements"
  add_foreign_key "marques", "annonce_cats"
  add_foreign_key "mlm_points", "annonce_accounts"
  add_foreign_key "orders", "annonce_accounts"
  add_foreign_key "orders", "credit_products"
  add_foreign_key "orders", "devises"
  add_foreign_key "tag_cats", "annonce_cats"
  add_foreign_key "virement_remises", "devises"
  add_foreign_key "virements", "annonce_account_ribs"
  add_foreign_key "virements", "annonce_accounts"
  add_foreign_key "virements", "commissions"
  add_foreign_key "virements", "devises"
  add_foreign_key "virements", "virement_remises"
end
