Files
1sonhador 9d43854277 feat: Initial MoneyFlix project setup
- Created separate MoneyFlix project directory
- Copied Node.js redirector from production server
- Added CRM PHP code (Redirects module, Core classes, Config, Routes, Views)
- Created comprehensive documentation (README_MONEYFLIX.md)
- Added sync script to keep CRM code updated (sync-from-crm.sh)
- Configured .gitignore for Node.js and PHP
- Set up proper project structure for multi-client isolation

This separates MoneyFlix from the main CRM to avoid confusion
between different client systems and provides a dedicated
environment for MoneyFlix-specific development and maintenance.
2025-10-03 12:09:41 +01:00

35 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
namespace App\Core\Database\Migrations;
use App\Core\Database\Migration;
class CreateRevenueTable extends Migration
{
public function up(): void
{
$this->createTable('revenue', function($table) {
$table->bigInteger('id')->autoIncrement()->notNull();
$table->decimal('amount', 10, 2)->default(0.00)->notNull()->comment('Revenue amount');
$table->string('source', 100)->nullable()->comment('Revenue source');
$table->string('category', 100)->nullable()->comment('Revenue category');
$table->text('description')->nullable()->comment('Revenue description');
$table->tinyInteger('status')->default(1)->notNull()->comment('0=inactive, 1=active, -1=deleted');
$table->timestamp('created_at')->default('CURRENT_TIMESTAMP')->notNull();
$table->timestamp('updated_at')->default('CURRENT_TIMESTAMP')->notNull();
$table->primaryKey('id');
$table->index(['status']);
$table->index(['created_at']);
$table->index(['source']);
$table->index(['category']);
$table->compositeIndex(['status', 'created_at'], 'idx_status_date');
});
}
public function down(): void
{
$this->dropTable('revenue');
}
}