source: trunk/Modules/System/SystemModels.php

Last change on this file was 923, checked in by chronos, 3 years ago
  • Modified: Improved model definitions.
File size: 1.7 KB
Line 
1<?php
2
3class UnitOfMeasure extends Model
4{
5 static function GetModelDesc(): ModelDesc
6 {
7 $Desc = new ModelDesc(self::GetClassName());
8 $Desc->AddString('Unit');
9 $Desc->AddString('Name');
10 return $Desc;
11 }
12}
13
14class Action extends Model
15{
16 static function GetModelDesc(): ModelDesc
17 {
18 $Desc = new ModelDesc(self::GetClassName());
19 $Desc->AddString('Title');
20 $Desc->AddReference('Type', ActionType::GetClassName());
21 $Desc->AddString('URL');
22 $Desc->AddReference('Group', ActionGroup::GetClassName());
23 $Desc->AddReference('Icon', ActionIcon::GetClassName());
24 $Desc->AddReference('PermissionOperation', PermissionOperation::GetClassName());
25 $Column = $Desc->AddBoolean('Enable');
26 $Column->Default = true;
27 return $Desc;
28 }
29}
30
31class ActionIcon extends Model
32{
33 static function GetModelDesc(): ModelDesc
34 {
35 $Desc = new ModelDesc(self::GetClassName());
36 $Desc->AddString('Name');
37 return $Desc;
38 }
39}
40
41class ActionGroup extends Model
42{
43 static function GetModelDesc(): ModelDesc
44 {
45 $Desc = new ModelDesc(self::GetClassName());
46 $Desc->AddString('Name');
47 return $Desc;
48 }
49}
50
51class ActionType extends Model
52{
53 static function GetModelDesc(): ModelDesc
54 {
55 $Desc = new ModelDesc(self::GetClassName());
56 $Desc->AddString('Name');
57 return $Desc;
58 }
59}
60
61class Language extends Model
62{
63 static function GetModelDesc(): ModelDesc
64 {
65 $Desc = new ModelDesc(self::GetClassName());
66 $Desc->AddString('Name');
67 return $Desc;
68 }
69}
70
71class Country extends Model
72{
73 static function GetModelDesc(): ModelDesc
74 {
75 $Desc = new ModelDesc(self::GetClassName());
76 $Desc->AddString('Name');
77 return $Desc;
78 }
79}
Note: See TracBrowser for help on using the repository browser.