feat: add Party management API with RESTful endpoints and comprehensive documentation

- Introduce Party model with lifecycle states (draft, published, canceled, sold_out)
- Add RESTful API endpoints under /api/v1/parties for CRUD operations
- Create ApiController base with API key authentication
- Implement comprehensive code comments across models and controllers
- Add database migration for parties table with proper indexes
- Configure API routes with namespaced versioning
This commit is contained in:
kbe
2025-08-23 18:03:32 +02:00
parent 74a1c446c4
commit ef9cfd6cdf
10 changed files with 266 additions and 6 deletions

View File

@@ -0,0 +1,19 @@
class CreateParties < ActiveRecord::Migration[8.0]
def change
create_table :parties do |t|
t.string :name, null: false
t.text :description, null: false
t.integer :state, default: 0, null: false
t.string :venue_name, null: false
t.string :venue_address, null: false
t.decimal :latitude, precision: 10, scale: 6, null: false
t.decimal :longitude, precision: 10, scale: 6, null: false
t.boolean :featured, default: false, null: false
t.timestamps
end
add_index :parties, :state
add_index :parties, :featured
add_index :parties, [:latitude, :longitude]
end
end