add migration delivery_slot
This commit is contained in:
parent
3e9a19347d
commit
9ef66a8c30
|
|
@ -2,10 +2,8 @@
|
|||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="0d233660-d4c2-4814-b3b2-6a34cb7a666b" name="Changes" comment="add order to branch in 1401-08-12">
|
||||
<change afterPath="$PROJECT_DIR$/app/Http/Controllers/Api/DeliverySlotController.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/Models/DeliverySlot.php" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/database/migrations/2025_07_23_203640_create_delivery_slots_table.php" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/routes/api.php" beforeDir="false" afterPath="$PROJECT_DIR$/routes/api.php" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
|
@ -170,12 +168,13 @@
|
|||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="WebServerToolWindowFactoryState" value="true" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/../henza_admin" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$/database/migrations" />
|
||||
<property name="nodejs_package_manager_path" value="npm" />
|
||||
<property name="vue.rearranger.settings.migration" value="true" />
|
||||
</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="CopyFile.RECENT_KEYS">
|
||||
<recent name="C:\[Drive1]\[Work]\MR.Montazer\henza\henzagold_shop_server\database\migrations" />
|
||||
<recent name="C:\[Drive1]\[Work]\MR.Montazer\henza\henzagold_shop_server\resources\views" />
|
||||
<recent name="C:\[Drive1]\[Work]\MR.Montazer\henza\henzagold_shop_server\app\Http\Controllers\Customer" />
|
||||
<recent name="E:\laragon\www\henza" />
|
||||
|
|
@ -254,6 +253,7 @@
|
|||
<workItem from="1749579149128" duration="3149000" />
|
||||
<workItem from="1753036614645" duration="1648000" />
|
||||
<workItem from="1753121915142" duration="2398000" />
|
||||
<workItem from="1753294245217" duration="349000" />
|
||||
</task>
|
||||
<task id="LOCAL-00001" summary="update">
|
||||
<created>1659602597748</created>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateDeliverySlotsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('delivery_slots', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->date('delivery_date')->comment('تاریخ تحویل');
|
||||
$table->time('start_time')->comment('زمان شروع بازه');
|
||||
$table->time('end_time')->comment('زمان پایان بازه');
|
||||
$table->integer('max_orders')->comment('حداکثر تعداد سفارش');
|
||||
$table->integer('order_count')->default(0)->comment('تعداد سفارشهای ثبت شده');
|
||||
$table->boolean('is_active')->default(true)->comment('وضعیت فعال بودن');
|
||||
$table->timestamps();
|
||||
|
||||
$table->index(['delivery_date', 'start_time']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('delivery_slots');
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue