From 7da35d00d58951feb6f7c261c7850ac2df2e320a Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 24 Sep 2021 18:21:56 +0200 Subject: [PATCH] app model --- Models/App.php | 60 ++++++++++++++++++++++++++++++++++++++++ Models/AppMapper.php | 65 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+) create mode 100644 Models/App.php create mode 100644 Models/AppMapper.php diff --git a/Models/App.php b/Models/App.php new file mode 100644 index 0000000..a256524 --- /dev/null +++ b/Models/App.php @@ -0,0 +1,60 @@ +> + * @since 1.0.0 + */ + protected static array $columns = [ + 'app_id' => ['name' => 'app_id', 'type' => 'int', 'internal' => 'id'], + 'app_name' => ['name' => 'app_name', 'type' => 'string', 'internal' => 'name'], + 'app_theme' => ['name' => 'app_theme', 'type' => 'string', 'internal' => 'theme'], + 'app_status' => ['name' => 'app_status', 'type' => 'int', 'internal' => 'status'], + ]; + + /** + * Model to use by the mapper. + * + * @var string + * @since 1.0.0 + */ + protected static string $model = App::class; + + /** + * Primary table. + * + * @var string + * @since 1.0.0 + */ + protected static string $table = 'app'; + + /** + * Primary field name. + * + * @var string + * @since 1.0.0 + */ + protected static string $primaryField = 'app_id'; +}