Added users support

This commit is contained in:
2025-08-19 07:24:18 +02:00
parent 541b181c87
commit 20b62e7312
18 changed files with 592 additions and 35 deletions

15
db/schema.rb generated
View File

@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.1].define(version: 2025_07_04_092438) do
ActiveRecord::Schema[7.1].define(version: 2025_07_31_114403) do
create_table "companies", force: :cascade do |t|
t.string "name"
t.string "id_number"
@@ -66,8 +66,21 @@ ActiveRecord::Schema[7.1].define(version: 2025_07_04_092438) do
t.index ["company_id"], name: "index_teams_on_company_id"
end
create_table "users", force: :cascade do |t|
t.string "username"
t.string "password_digest"
t.integer "company_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "email"
t.index ["company_id"], name: "index_users_on_company_id"
t.index ["email"], name: "index_users_on_email", unique: true
t.index ["username"], name: "index_users_on_username", unique: true
end
add_foreign_key "reservations", "companies"
add_foreign_key "reservations", "customers", column: ["customer_first_name", "customer_surname", "customer_original_phone"], primary_key: ["first_name", "surname", "original_phone"]
add_foreign_key "reservations", "teams"
add_foreign_key "teams", "companies"
add_foreign_key "users", "companies"
end