2026-01-21 20:46:53 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Database\Seeders;
|
|
|
|
|
|
|
|
|
|
use App\Models\Tenants\Schedule;
|
|
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 부가세 신고 마감일 시드
|
|
|
|
|
*
|
|
|
|
|
* 본사(HQ)에서 등록하는 글로벌 일정 (tenant_id = NULL)
|
|
|
|
|
* 모든 테넌트에서 조회 가능
|
|
|
|
|
*
|
|
|
|
|
* 분기별 마감일:
|
|
|
|
|
* - 1분기: 1월 25일 (전년도 4분기분)
|
|
|
|
|
* - 2분기: 4월 25일 (1분기분)
|
|
|
|
|
* - 3분기: 7월 25일 (2분기분)
|
|
|
|
|
* - 4분기: 10월 25일 (3분기분)
|
|
|
|
|
*/
|
|
|
|
|
class TaxScheduleSeeder extends Seeder
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Run the database seeds.
|
|
|
|
|
*/
|
|
|
|
|
public function run(): void
|
|
|
|
|
{
|
|
|
|
|
$year = now()->year;
|
|
|
|
|
|
|
|
|
|
$taxDeadlines = [
|
|
|
|
|
[
|
|
|
|
|
'title' => "{$year}년 1분기 부가세 신고",
|
|
|
|
|
'description' => '전년도 4분기분 부가세 예정신고 마감일',
|
|
|
|
|
'start_date' => "{$year}-01-25",
|
|
|
|
|
'type' => Schedule::TYPE_TAX,
|
|
|
|
|
'is_recurring' => true,
|
|
|
|
|
'recurrence_rule' => Schedule::RECURRENCE_YEARLY,
|
|
|
|
|
'color' => '#EF4444', // red-500
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'title' => "{$year}년 2분기 부가세 신고",
|
|
|
|
|
'description' => '1분기분 부가세 예정신고 마감일',
|
|
|
|
|
'start_date' => "{$year}-04-25",
|
|
|
|
|
'type' => Schedule::TYPE_TAX,
|
|
|
|
|
'is_recurring' => true,
|
|
|
|
|
'recurrence_rule' => Schedule::RECURRENCE_YEARLY,
|
|
|
|
|
'color' => '#EF4444', // red-500
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'title' => "{$year}년 3분기 부가세 신고",
|
|
|
|
|
'description' => '2분기분 부가세 예정신고 마감일',
|
|
|
|
|
'start_date' => "{$year}-07-25",
|
|
|
|
|
'type' => Schedule::TYPE_TAX,
|
|
|
|
|
'is_recurring' => true,
|
|
|
|
|
'recurrence_rule' => Schedule::RECURRENCE_YEARLY,
|
|
|
|
|
'color' => '#EF4444', // red-500
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'title' => "{$year}년 4분기 부가세 신고",
|
|
|
|
|
'description' => '3분기분 부가세 예정신고 마감일',
|
|
|
|
|
'start_date' => "{$year}-10-25",
|
|
|
|
|
'type' => Schedule::TYPE_TAX,
|
|
|
|
|
'is_recurring' => true,
|
|
|
|
|
'recurrence_rule' => Schedule::RECURRENCE_YEARLY,
|
|
|
|
|
'color' => '#EF4444', // red-500
|
|
|
|
|
],
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
foreach ($taxDeadlines as $deadline) {
|
|
|
|
|
Schedule::firstOrCreate(
|
|
|
|
|
[
|
|
|
|
|
'tenant_id' => null, // 글로벌 일정
|
|
|
|
|
'title' => $deadline['title'],
|
|
|
|
|
'start_date' => $deadline['start_date'],
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'description' => $deadline['description'],
|
|
|
|
|
'type' => $deadline['type'],
|
|
|
|
|
'is_all_day' => true,
|
|
|
|
|
'is_recurring' => $deadline['is_recurring'],
|
|
|
|
|
'recurrence_rule' => $deadline['recurrence_rule'],
|
|
|
|
|
'color' => $deadline['color'],
|
|
|
|
|
'is_active' => true,
|
|
|
|
|
]
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->command->info("부가세 신고 마감일 {$year}년 일정이 등록되었습니다.");
|
|
|
|
|
}
|
2026-01-26 20:29:22 +09:00
|
|
|
}
|