8 changed files with 173 additions and 214 deletions
@ -0,0 +1,22 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace App\Models; |
||||
|
|
||||
|
use Illuminate\Database\Eloquent\Factories\HasFactory; |
||||
|
use Illuminate\Database\Eloquent\Model; |
||||
|
|
||||
|
class ParkingCameraSendLog extends Model |
||||
|
{ |
||||
|
use HasFactory; |
||||
|
|
||||
|
protected $table = 'parking_camera_send_log'; |
||||
|
|
||||
|
protected $fillable = [ |
||||
|
'camera_ip', |
||||
|
'color_occupy', |
||||
|
'color_vacant', |
||||
|
'is_flicker', |
||||
|
'status' |
||||
|
]; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,34 @@ |
|||||
|
<?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('parking_camera_send_log', function (Blueprint $table) { |
||||
|
$table->id(); |
||||
|
$table->string('camera_ip', 15)->default('')->comment('相机ip'); |
||||
|
$table->string('color_occupy', 20)->default('')->comment('有车颜色'); |
||||
|
$table->string('color_vacant', 20)->default('')->comment('无车颜色'); |
||||
|
$table->tinyInteger('is_flicker')->default(0)->comment('是否闪烁'); |
||||
|
$table->tinyInteger('status')->default(0)->comment('发送状态'); |
||||
|
$table->timestamps(); |
||||
|
$table->innoDb(); |
||||
|
$table->comment('车位相机推送记录'); |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* Reverse the migrations. |
||||
|
*/ |
||||
|
public function down(): void |
||||
|
{ |
||||
|
Schema::dropIfExists('parking_camera_send_log'); |
||||
|
} |
||||
|
}; |
||||
Loading…
Reference in new issue