# 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.
#
# This file is the source Rails uses to define your schema when running `bin/rails
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
# be faster and is potentially less error prone than running all of your
# migrations from scratch. Old migrations may fail to apply correctly if those
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[8.1].define(version: 2026_04_16_045305) do
  create_table "address_books", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.datetime "created_at", null: false
    t.string "email"
    t.string "from_email"
    t.string "name"
    t.string "notes"
    t.string "organization"
    t.datetime "updated_at", null: false
    t.integer "user_id"
  end

  create_table "announcements", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.timestamp "begin_at"
    t.text "body"
    t.integer "body_show_flg", default: 0
    t.datetime "created_at", null: false
    t.timestamp "end_at"
    t.integer "show_flg", default: 1
    t.string "title"
    t.datetime "updated_at", null: false
  end

  create_table "app_envs", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.integer "category"
    t.datetime "created_at", null: false
    t.string "key"
    t.string "note"
    t.datetime "updated_at", null: false
    t.string "value"
  end

  create_table "attachments", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.string "content_type"
    t.datetime "created_at", null: false
    t.string "file_save_pass"
    t.string "name"
    t.string "relayid"
    t.integer "send_matter_id"
    t.bigint "size"
    t.datetime "updated_at", null: false
    t.string "virus_check"
    t.index ["id", "send_matter_id"], name: "attachments_index_keys_2"
    t.index ["relayid"], name: "attachments_index_keys_3"
    t.index ["send_matter_id", "id"], name: "attachments_index_keys_1"
    t.index ["size", "created_at", "name", "send_matter_id", "id"], name: "attachments_index_keys_4"
  end

  create_table "content_frames", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.integer "content_frame_order"
    t.datetime "created_at", null: false
    t.text "description"
    t.integer "expression_flag"
    t.integer "master_frame"
    t.string "title"
    t.datetime "updated_at", null: false
  end

  create_table "content_items", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.integer "category"
    t.integer "content_item_order"
    t.datetime "created_at", null: false
    t.integer "flg"
    t.binary "image", size: :medium
    t.integer "master_frame"
    t.string "string1"
    t.text "text1"
    t.datetime "updated_at", null: false
    t.string "url"
  end

  create_table "file_dl_checks", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.integer "attachment_id"
    t.datetime "created_at", null: false
    t.integer "download_flg"
    t.integer "receiver_id"
    t.datetime "updated_at", null: false
    t.index ["attachment_id", "receiver_id", "id", "download_flg"], name: "file_dl_checks_index_keys_2"
    t.index ["id", "receiver_id", "attachment_id", "download_flg"], name: "file_dl_checks_index_keys_3"
    t.index ["receiver_id", "attachment_id", "id", "download_flg"], name: "file_dl_checks_index_keys_1"
  end

  create_table "file_dl_logs", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.datetime "created_at", null: false
    t.integer "file_dl_check_id"
    t.datetime "updated_at", null: false
    t.index ["file_dl_check_id", "created_at", "id"], name: "file_dl_logs_index_keys_1"
    t.index ["file_dl_check_id", "id", "created_at"], name: "file_dl_logs_index_keys_2"
  end

  create_table "moderaters", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.datetime "created_at", null: false
    t.integer "moderate_id"
    t.integer "number"
    t.datetime "updated_at", null: false
    t.integer "user_id"
  end

  create_table "moderates", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.datetime "created_at", null: false
    t.string "name"
    t.integer "route"
    t.integer "type_flag"
    t.datetime "updated_at", null: false
    t.integer "use_flag"
  end

  create_table "receivers", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.datetime "created_at", null: false
    t.string "mail_address"
    t.string "name"
    t.integer "send_matter_id"
    t.datetime "updated_at", null: false
    t.string "url"
    t.index ["id", "send_matter_id", "mail_address", "name"], name: "receivers_index_keys_3"
    t.index ["id", "send_matter_id", "name", "mail_address"], name: "receivers_index_keys_4"
    t.index ["send_matter_id", "mail_address", "name", "id"], name: "receivers_index_keys_2"
    t.index ["send_matter_id", "name", "mail_address", "id"], name: "receivers_index_keys_1"
    t.index ["url"], name: "receivers_index_keys_5"
  end

  create_table "request_matters", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.datetime "created_at", null: false
    t.string "mail_address"
    t.text "message"
    t.integer "moderate_flag"
    t.integer "moderate_result"
    t.string "name"
    t.timestamp "sent_at"
    t.datetime "updated_at", null: false
    t.string "url"
    t.string "user_id"
    t.index ["id", "mail_address", "name"], name: "request_matters_index_keys_4"
    t.index ["id", "name", "mail_address"], name: "request_matters_index_keys_3"
    t.index ["url"], name: "request_matters_index_keys_5"
    t.index ["user_id", "id", "mail_address", "name"], name: "request_matters_index_keys_2"
    t.index ["user_id", "id", "name", "mail_address"], name: "request_matters_index_keys_1"
  end

  create_table "request_moderaters", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.text "content"
    t.datetime "created_at", null: false
    t.integer "moderater_id"
    t.integer "number"
    t.integer "request_moderate_id"
    t.integer "result"
    t.integer "send_flag"
    t.datetime "updated_at", null: false
    t.string "url"
    t.integer "user_id"
    t.integer "user_name"
  end

  create_table "request_moderates", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.datetime "created_at", null: false
    t.integer "moderate_id"
    t.timestamp "moderated_at"
    t.integer "moderater_id"
    t.string "name"
    t.integer "request_matter_id"
    t.integer "result"
    t.integer "type_flag"
    t.datetime "updated_at", null: false
  end

  create_table "requested_attachments", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.string "content_type"
    t.datetime "created_at", null: false
    t.integer "download_flg"
    t.string "file_save_pass"
    t.string "name"
    t.string "relayid"
    t.integer "requested_matter_id"
    t.bigint "size"
    t.datetime "updated_at", null: false
    t.string "virus_check"
    t.index ["id", "requested_matter_id", "name", "size", "created_at"], name: "requested_attachments_index_keys_2"
    t.index ["requested_matter_id", "id", "name", "size", "created_at"], name: "requested_attachments_index_keys_1"
    t.index ["size", "created_at", "name", "requested_matter_id", "id"], name: "requested_attachments_index_keys_3"
  end

  create_table "requested_file_dl_logs", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.datetime "created_at", null: false
    t.integer "requested_attachment_id"
    t.datetime "updated_at", null: false
    t.index ["requested_attachment_id", "created_at", "id"], name: "requested_file_dl_logs_index_keys_1"
    t.index ["requested_attachment_id", "id", "created_at"], name: "requested_file_dl_logs_index_keys_2"
  end

  create_table "requested_matters", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.datetime "created_at", null: false
    t.integer "download_check"
    t.integer "file_life_period"
    t.datetime "file_up_date", precision: nil
    t.string "mail_address"
    t.text "message"
    t.string "name"
    t.integer "password_notice"
    t.string "receive_password"
    t.string "relayid"
    t.integer "request_matter_id"
    t.string "send_password"
    t.integer "status"
    t.datetime "updated_at", null: false
    t.string "url"
    t.string "url_operation"
    t.index ["id", "request_matter_id", "name", "mail_address"], name: "requested_matters_index_keys_2"
    t.index ["request_matter_id", "id", "name", "mail_address"], name: "requested_matters_index_keys_1"
    t.index ["url"], name: "requested_matters_index_keys_3"
    t.index ["url_operation"], name: "requested_matters_index_keys_4"
  end

  create_table "send_matters", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.datetime "created_at", null: false
    t.integer "download_check"
    t.integer "file_life_period"
    t.string "mail_address"
    t.text "message"
    t.integer "moderate_flag"
    t.integer "moderate_result"
    t.string "name"
    t.integer "password_notice"
    t.string "receive_password"
    t.string "relayid"
    t.timestamp "sent_at"
    t.integer "status"
    t.datetime "updated_at", null: false
    t.string "url"
    t.string "user_id"
    t.index ["id", "mail_address", "name"], name: "send_matters_index_keys_5"
    t.index ["id", "name", "mail_address"], name: "send_matters_index_keys_4"
    t.index ["relayid"], name: "send_matters_index_keys_1"
    t.index ["user_id", "id", "mail_address", "name"], name: "send_matters_index_keys_3"
    t.index ["user_id", "id", "name", "mail_address"], name: "send_matters_index_keys_2"
  end

  create_table "send_moderaters", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.text "content"
    t.datetime "created_at", null: false
    t.integer "moderater_id"
    t.integer "number"
    t.integer "result"
    t.integer "send_flag"
    t.integer "send_moderate_id"
    t.datetime "updated_at", null: false
    t.string "url"
    t.integer "user_id"
    t.integer "user_name"
  end

  create_table "send_moderates", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.datetime "created_at", null: false
    t.integer "moderate_id"
    t.timestamp "moderated_at"
    t.string "name"
    t.integer "result"
    t.integer "send_matter_id"
    t.integer "type_flag"
    t.datetime "updated_at", null: false
  end

  create_table "users", charset: "utf8mb4", collation: "utf8mb4_unicode_ci", force: :cascade do |t|
    t.integer "category"
    t.datetime "created_at", null: false
    t.string "crypted_password", limit: 40
    t.string "email"
    t.string "from_organization_add"
    t.string "login"
    t.integer "moderate_id"
    t.string "name"
    t.text "note"
    t.string "password_digest"
    t.string "remember_token"
    t.datetime "remember_token_expires_at", precision: nil
    t.string "salt", limit: 40
    t.boolean "to_organization_add", default: false
    t.datetime "updated_at", null: false
  end
end
