- Replace Stripe automatic payouts with manual admin-processed bank transfers - Add banking information fields (IBAN, bank name, account holder) to User model - Implement manual payout workflow: pending → approved → processing → completed - Add comprehensive admin interface for payout review and processing - Update Payout model with manual processing fields and workflow methods - Add transfer reference tracking and rejection/failure handling - Consolidate all migration fragments into clean "create" migrations - Add comprehensive documentation for manual payout workflow - Fix Event payout_status enum definition and database column issues This addresses France's lack of Stripe Global Payouts support by implementing a complete manual bank transfer workflow while maintaining audit trails and proper admin controls. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
28 lines
905 B
Ruby
28 lines
905 B
Ruby
class CreatePayouts < ActiveRecord::Migration[8.0]
|
|
def change
|
|
create_table :payouts do |t|
|
|
t.integer :amount_cents, null: false
|
|
t.integer :fee_cents, null: false, default: 0
|
|
t.integer :status, null: false, default: 0
|
|
t.string :stripe_payout_id
|
|
t.integer :total_orders_count, null: false, default: 0
|
|
t.integer :refunded_orders_count, null: false, default: 0
|
|
|
|
t.references :user, null: false, foreign_key: false
|
|
t.references :event, null: false, foreign_key: false
|
|
|
|
# Manual processing fields
|
|
t.references :processed_by, null: true, foreign_key: { to_table: :users }
|
|
t.datetime :processed_at
|
|
t.text :rejection_reason
|
|
t.string :bank_transfer_reference
|
|
|
|
t.timestamps
|
|
end
|
|
|
|
add_index :payouts, :status
|
|
add_index :payouts, :stripe_payout_id, unique: true
|
|
add_index :payouts, [:event_id, :status]
|
|
end
|
|
end
|