'boolean', 'sort_order' => 'integer', ]; /** * 테넌트 관계 */ public function tenant(): BelongsTo { return $this->belongsTo(Tenant::class); } /** * 테넌트별 활성 계정과목 조회 (하위 호환용) */ public static function getActiveByTenant(int $tenantId) { return self::getActive(); } /** * 전체 활성 계정과목 조회 (글로벌) */ public static function getActive() { return self::where('is_active', true) ->orderBy('sort_order') ->orderBy('code') ->get(); } /** * 전체 계정과목 조회 (글로벌) */ public static function getAll() { return self::orderBy('sort_order') ->orderBy('code') ->get(); } }