feat: Reimplement order and invoice management with new service and repository layers, introduce compression middleware, and update database schema.

This commit is contained in:
pbao9
2026-03-12 09:30:29 +07:00
parent 7f6264c87f
commit 1e09ccf17b
87 changed files with 2348 additions and 2612 deletions
@@ -14,9 +14,16 @@ return new class extends Migration
public function up()
{
//
Schema::create('discount_customer',function (Blueprint $table) {
$table->bigInteger('discount_id')->default(0)->index();
$table->bigInteger('customer_id')->default(0)->index();
Schema::create('discount_customer', function (Blueprint $table) {
$table->foreignId('discount_id')
->constrained('discount')
->cascadeOnDelete();
$table->foreignId('customer_id')
->constrained('user')
->cascadeOnDelete();
$table->primary(['discount_id', 'customer_id']);
});
}
@@ -27,9 +34,6 @@ return new class extends Migration
*/
public function down()
{
Schema::table('discount_customer',function (Blueprint $table) {
$table->dropForeign(['discount_id','customer_id']);
$table->drop();
});
Schema::dropIfExists('discount_customer');
}
};