Browse Source

岗亭管理字段错误

master
wanghongjun 2 weeks ago
parent
commit
6d78f04690
  1. 2
      app/Models/ParkingGuardBooth.php
  2. 4
      app/Services/ParkingGuardBoothService.php
  3. 2
      database/migrations/2026_06_02_143449_create_parking_guard_booth_table.php

2
app/Models/ParkingGuardBooth.php

@ -16,7 +16,7 @@ class ParkingGuardBooth extends Model
protected $fillable protected $fillable
= [ = [
'name', 'name',
'remake' 'remark'
]; ];
protected $hidden protected $hidden

4
app/Services/ParkingGuardBoothService.php

@ -30,7 +30,7 @@ class ParkingGuardBoothService extends BaseService
$model = ParkingGuardBooth::query()->create([ $model = ParkingGuardBooth::query()->create([
'name' => $data['name'], 'name' => $data['name'],
'remake' => $data['remake'] ?? '', 'remark' => $data['remark'] ?? '',
'created_at' => get_datetime() 'created_at' => get_datetime()
]); ]);
@ -82,7 +82,7 @@ class ParkingGuardBoothService extends BaseService
$model->update([ $model->update([
'name' => $data['name'], 'name' => $data['name'],
'remake' => $data['remake'] ?? '', 'remark' => $data['remark'] ?? '',
'updated_at' => get_datetime() 'updated_at' => get_datetime()
]); ]);

2
database/migrations/2026_06_02_143449_create_parking_guard_booth_table.php

@ -14,7 +14,7 @@ return new class extends Migration
Schema::create('parking_guard_booth', function (Blueprint $table) { Schema::create('parking_guard_booth', function (Blueprint $table) {
$table->id(); $table->id();
$table->string('name', 50)->comment('岗亭名称'); $table->string('name', 50)->comment('岗亭名称');
$table->string('remake', 255)->default('')->comment('备注'); $table->string('remark', 255)->default('')->comment('备注');
$table->timestamps(); $table->timestamps();
$table->softDeletes(); $table->softDeletes();
$table->innoDb(); $table->innoDb();

Loading…
Cancel
Save