新增 UsdtC2C Resource 与页面
This commit is contained in:
@@ -10,10 +10,10 @@ public function up(): void
|
||||
Schema::create('tg_comm', function (Blueprint $table) {
|
||||
$table->increments('id'); // PRIMARY KEY + AUTO_INCREMENT
|
||||
$table->string('command')->nullable()->comment('指令名称');
|
||||
$table->string('Instructions')->nullable()->comment('说明');
|
||||
$table->string('instructions')->nullable()->comment('指令用途');
|
||||
$table->string('action', )->nullable()->comment('对应动作指令');
|
||||
$table->longText('memo')->nullable()->comment('使用说明');
|
||||
$table->integer('dis_play')->default(1)->comment('指令列表 0不显示 1显示');
|
||||
$table->integer('display')->default(1)->comment('指令列表 0不显示 1显示');
|
||||
$table->integer('manager')->default(0)->comment('管理权限0需要1不需要');
|
||||
$table->integer('valid')->default(1)->comment('0停用1启用');
|
||||
$table->dateTime('created_at')->useCurrent()->nullable();
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration {
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('UsdtC2c', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('Currency')->nullable();
|
||||
$table->decimal('Highest', 20, 8)->nullable();
|
||||
$table->decimal('Million', 20, 8)->nullable();
|
||||
$table->dateTime('created_at')->useCurrent()->nullable();
|
||||
$table->dateTime('updated_at')->nullable()->useCurrentOnUpdate();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('UsdtC2c');
|
||||
}
|
||||
};
|
||||
@@ -8,16 +8,22 @@
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
|
||||
public function run(): void
|
||||
{
|
||||
$this->call(UsdtC2cSeeder::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// User::factory(10)->create();
|
||||
// public function run(): void
|
||||
// {
|
||||
// // User::factory(10)->create();
|
||||
|
||||
User::factory()->create([
|
||||
'name' => 'Test User',
|
||||
'email' => 'test@example.com',
|
||||
]);
|
||||
}
|
||||
// User::factory()->create([
|
||||
// 'name' => 'Test User',
|
||||
// 'email' => 'test@example.com',
|
||||
// ]);
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\UsdtC2c;
|
||||
|
||||
class UsdtC2cSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
UsdtC2c::create([
|
||||
'Currency' => 'LAK',
|
||||
'Highest' => 27000.12345678,
|
||||
'Million' => 270000000.12345678,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user