l11n, unit/app and simplification fixes

This commit is contained in:
Dennis Eichhorn 2023-01-07 19:00:33 +01:00
parent 45d7273032
commit 081da4ec2f
4 changed files with 18 additions and 0 deletions

View File

@ -13,6 +13,14 @@
"name": "qa_app_name",
"type": "VARCHAR(255)",
"default": null
},
"qa_app_unit": {
"name": "qa_app_unit",
"type": "INT",
"default": null,
"null": true,
"foreignTable": "organization_unit",
"foreignKey": "organization_unit_id"
}
}
},

View File

@ -420,6 +420,7 @@ final class ApiController extends Controller
{
$app = new QAApp();
$app->name = (string) ($request->getData('name') ?? '');
$app->unit = $request->getData('unit', 'int');
return $app;
}

View File

@ -40,6 +40,14 @@ class QAApp implements \JsonSerializable
*/
public string $name = '';
/**
* Unit
*
* @var null|int
* @since 1.0.0
*/
public ?int $unit = null;
/**
* Get id.
*

View File

@ -35,6 +35,7 @@ final class QAAppMapper extends DataMapperFactory
public const COLUMNS = [
'qa_app_id' => ['name' => 'qa_app_id', 'type' => 'int', 'internal' => 'id'],
'qa_app_name' => ['name' => 'qa_app_name', 'type' => 'string', 'internal' => 'name'],
'qa_app_unit' => ['name' => 'qa_app_unit', 'type' => 'int', 'internal' => 'unit'],
];
/**