add: Offline shop.

master
WildEgo 2025-11-13 10:32:39 +00:00
parent 2c8c2274af
commit 2217592ebd
5 changed files with 263 additions and 0 deletions

View File

@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('account', function (Blueprint $table) {
$table->dateTime('premium_privateshop_expire')->useCurrent()->after('money_drop_rate_expire');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('account', function (Blueprint $table) {
$table->dropColumn('premium_privateshop_expire');
});
}
};

View File

@ -0,0 +1,40 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('player', function (Blueprint $table) {
$table->integer('private_shop_unlocked_slot')
->default(0)
->after('level_step');
});
Schema::table('player_deleted', function (Blueprint $table) {
$table->integer('private_shop_unlocked_slot')
->default(0)
->after('level_step');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('player', function (Blueprint $table) {
$table->dropColumn('private_shop_unlocked_slot');
});
Schema::table('player_deleted', function (Blueprint $table) {
$table->dropColumn('private_shop_unlocked_slot');
});
}
};

View File

@ -0,0 +1,43 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('private_shop', function (Blueprint $table) {
$table->unsignedInteger('owner_id')->primary();
$table->string('owner_name', 25);
$table->enum('state', ['CLOSED', 'OPEN', 'MODIFY'])->default('CLOSED');
$table->string('title', 33);
$table->tinyInteger('title_type');
$table->integer('vnum');
$table->integer('x');
$table->integer('y');
$table->integer('map_index');
$table->tinyInteger('channel');
$table->integer('port')->nullable();
$table->bigInteger('gold');
$table->integer('cheque');
$table->tinyInteger('page_count')->default(1);
$table->integer('premium_time')->default(0);
$table->integer('unlocked_slots')->default(0);
$table->foreign('owner_id')->references('id')->on('player')->cascadeOnDelete();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('private_shop');
}
};

View File

@ -0,0 +1,74 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('private_shop_item', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('owner_id')->default(0);
$table->unsignedSmallInteger('pos')->default(0);
$table->unsignedTinyInteger('count')->default(0);
$table->unsignedInteger('vnum')->default(0);
$table->unsignedBigInteger('gold')->default(0);
$table->unsignedInteger('cheque')->default(0);
$table->unsignedInteger('checkin')->default(0);
$table->unsignedInteger('refine_element')->default(0);
$table->unsignedInteger('transmutation')->default(0);
$table->unsignedInteger('socket0')->default(0);
$table->unsignedInteger('socket1')->default(0);
$table->unsignedInteger('socket2')->default(0);
$table->unsignedInteger('socket3')->default(0);
$table->unsignedInteger('socket4')->default(0);
$table->tinyInteger('attrtype0')->default(0);
$table->smallInteger('attrvalue0')->default(0);
$table->tinyInteger('attrtype1')->default(0);
$table->smallInteger('attrvalue1')->default(0);
$table->tinyInteger('attrtype2')->default(0);
$table->smallInteger('attrvalue2')->default(0);
$table->tinyInteger('attrtype3')->default(0);
$table->smallInteger('attrvalue3')->default(0);
$table->tinyInteger('attrtype4')->default(0);
$table->smallInteger('attrvalue4')->default(0);
$table->tinyInteger('attrtype5')->default(0);
$table->smallInteger('attrvalue5')->default(0);
$table->tinyInteger('attrtype6')->default(0);
$table->smallInteger('attrvalue6')->default(0);
$table->tinyInteger('apply_type0')->default(0);
$table->smallInteger('apply_value0')->default(0);
$table->tinyInteger('apply_path0')->default(0);
$table->tinyInteger('apply_type1')->default(0);
$table->smallInteger('apply_value1')->default(0);
$table->tinyInteger('apply_path1')->default(0);
$table->tinyInteger('apply_type2')->default(0);
$table->smallInteger('apply_value2')->default(0);
$table->tinyInteger('apply_path2')->default(0);
$table->tinyInteger('apply_type3')->default(0);
$table->smallInteger('apply_value3')->default(0);
$table->tinyInteger('apply_path3')->default(0);
$table->index('owner_id', 'owner_id_idx');
$table->index('vnum', 'item_vnum_index');
$table->foreign('owner_id')->references('id')->on('player')->cascadeOnDelete();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('private_shop_item');
}
};

View File

@ -0,0 +1,78 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('private_shop_sale_history', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedInteger('owner_id')->default(0);
$table->unsignedInteger('customer_id');
$table->string('customer_name', 26);
$table->dateTime('time');
$table->bigInteger('item_id');
$table->unsignedTinyInteger('count')->default(0);
$table->unsignedInteger('vnum')->default(0);
$table->unsignedBigInteger('gold')->default(0);
$table->unsignedInteger('cheque')->default(0);
$table->unsignedInteger('checkin')->default(0);
$table->unsignedInteger('refine_element')->default(0);
$table->unsignedInteger('transmutation')->default(0);
$table->unsignedInteger('socket0')->default(0);
$table->unsignedInteger('socket1')->default(0);
$table->unsignedInteger('socket2')->default(0);
$table->unsignedInteger('socket3')->default(0);
$table->unsignedInteger('socket4')->default(0);
$table->tinyInteger('attrtype0')->default(0);
$table->smallInteger('attrvalue0')->default(0);
$table->tinyInteger('attrtype1')->default(0);
$table->smallInteger('attrvalue1')->default(0);
$table->tinyInteger('attrtype2')->default(0);
$table->smallInteger('attrvalue2')->default(0);
$table->tinyInteger('attrtype3')->default(0);
$table->smallInteger('attrvalue3')->default(0);
$table->tinyInteger('attrtype4')->default(0);
$table->smallInteger('attrvalue4')->default(0);
$table->tinyInteger('attrtype5')->default(0);
$table->smallInteger('attrvalue5')->default(0);
$table->tinyInteger('attrtype6')->default(0);
$table->smallInteger('attrvalue6')->default(0);
$table->tinyInteger('apply_type0')->default(0);
$table->smallInteger('apply_value0')->default(0);
$table->tinyInteger('apply_path0')->default(0);
$table->tinyInteger('apply_type1')->default(0);
$table->smallInteger('apply_value1')->default(0);
$table->tinyInteger('apply_path1')->default(0);
$table->tinyInteger('apply_type2')->default(0);
$table->smallInteger('apply_value2')->default(0);
$table->tinyInteger('apply_path2')->default(0);
$table->tinyInteger('apply_type3')->default(0);
$table->smallInteger('apply_value3')->default(0);
$table->tinyInteger('apply_path3')->default(0);
$table->index('owner_id', 'owner_id_idx');
$table->index('vnum', 'item_vnum_index');
$table->foreign('owner_id')->references('id')->on('player')->cascadeOnDelete();
$table->foreign('customer_id')->references('id')->on('player')->cascadeOnDelete();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('private_shop_sale_history');
}
};