new network model and mfBaseModelV2
This commit is contained in:
@@ -238,6 +238,20 @@ class ConstructionConsentProject extends mfBaseModel {
|
||||
return $where;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array{id: int, name: string}[]
|
||||
*/
|
||||
public static function getByAdbNetzgebietId(int $adbNetzgebietId): array {
|
||||
$db = FronkDB::singleton();
|
||||
$id = $db->escape($adbNetzgebietId);
|
||||
$res = $db->query(
|
||||
"SELECT ccp.id, ccp.name FROM `ConstructionConsentProject` ccp
|
||||
JOIN `ConstructionConsentNetwork` ccn ON ccp.id = ccn.constructionconsentproject_id
|
||||
WHERE ccn.adb_netzgebiet_id = '{$id}'"
|
||||
);
|
||||
return $db->fetch_all_assoc($res) ?? [];
|
||||
}
|
||||
|
||||
public static function hasFaultyOwnerEntries(int $projectId): bool {
|
||||
if (empty($projectId)) return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user