'encrypted', 'last_sales_fetch_at' => 'datetime', 'last_purchases_fetch_at' => 'datetime', ]; protected $hidden = [ 'barobill_pwd', ]; // ========================================================================= // 관계 정의 // ========================================================================= public function tenant(): BelongsTo { return $this->belongsTo(\App\Models\Tenants\Tenant::class); } // ========================================================================= // 접근자 // ========================================================================= public function getFormattedBizNoAttribute(): string { $num = $this->biz_no; if (strlen($num) === 10) { return substr($num, 0, 3).'-'.substr($num, 3, 2).'-'.substr($num, 5); } return $num ?? ''; } public function getStatusLabelAttribute(): string { return match ($this->status) { 'active' => '활성', 'inactive' => '비활성', 'pending' => '대기', default => $this->status, }; } public function isTestMode(): bool { return $this->server_mode === 'test'; } }