2025-12-25 03:48:32 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Database\Seeders\Dummy;
|
|
|
|
|
|
|
|
|
|
use App\Models\Tenants\AttendanceSetting;
|
|
|
|
|
use Database\Seeders\DummyDataSeeder;
|
|
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
|
|
|
|
|
|
class DummyAttendanceSettingSeeder extends Seeder
|
|
|
|
|
{
|
|
|
|
|
public function run(): void
|
|
|
|
|
{
|
|
|
|
|
$tenantId = DummyDataSeeder::TENANT_ID;
|
|
|
|
|
$userId = DummyDataSeeder::USER_ID;
|
|
|
|
|
|
|
|
|
|
// 기존 설정이 있으면 스킵
|
|
|
|
|
$existing = AttendanceSetting::where('tenant_id', $tenantId)->first();
|
|
|
|
|
if ($existing) {
|
|
|
|
|
$this->command->info(' ⚠ attendance_settings: 이미 존재 (스킵)');
|
2026-01-13 19:49:28 +09:00
|
|
|
|
2025-12-25 03:48:32 +09:00
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
AttendanceSetting::create([
|
|
|
|
|
'tenant_id' => $tenantId,
|
|
|
|
|
'use_gps' => true,
|
|
|
|
|
'allowed_radius' => 500, // 500m
|
|
|
|
|
'hq_address' => '서울시 강남구 테헤란로 123',
|
|
|
|
|
'hq_latitude' => 37.5012,
|
|
|
|
|
'hq_longitude' => 127.0396,
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
$this->command->info(' ✓ attendance_settings: 1건 생성');
|
|
|
|
|
}
|
2026-01-13 19:49:28 +09:00
|
|
|
}
|