Changeset 893 for trunk/Modules/Task
- Timestamp:
- Jan 4, 2021, 9:55:40 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/Task/Task.php
r887 r893 12 12 $this->Description = 'Work and task management'; 13 13 $this->Dependencies = array('User'); 14 } 15 16 function GetModels(): array 17 { 18 return array('TaskGroup', 'Task', 'Work'); 14 19 } 15 20 … … 93 98 } 94 99 95 function DoInstall(): void96 {97 }98 99 100 function ShowDashboardItem(): string 100 101 { … … 105 106 } 106 107 } 108 109 class Task extends Model 110 { 111 static function GetDesc(): ModelDesc 112 { 113 $Desc = new ModelDesc('Task'); 114 $Desc->AddString('Name'); 115 $Desc->AddDate('TimeCreate'); 116 $Desc->AddDate('TimeDue'); 117 $Desc->AddDate('TimeClose'); 118 $Desc->AddEnum('Priority', array('Nízká', 'Střední', 'Vysoká')); 119 $Desc->AddBoolean('Public'); 120 $Desc->AddInteger('Progress'); 121 $Desc->AddReference('Group', 'TaskGroup'); 122 $Desc->AddString('Description'); 123 $Desc->AddText('Conclusion'); 124 $Desc->AddReference('AssignedTo', 'User'); 125 return $Desc; 126 } 127 } 128 129 class TaskGroup extends Model 130 { 131 static function GetDesc(): ModelDesc 132 { 133 $Desc = new ModelDesc('TaskGroup'); 134 $Desc->AddString('Name'); 135 $Desc->AddText('Description'); 136 $Desc->AddReference('Parent', 'TaskGroup'); 137 return $Desc; 138 } 139 } 140 141 class Work extends Model 142 { 143 static function GetDesc(): ModelDesc 144 { 145 $Desc = new ModelDesc('Work'); 146 $Desc->AddString('Name'); 147 $Desc->AddText('Description'); 148 $Desc->AddDateTime('TimeStart'); 149 $Desc->AddFloat('Duration'); 150 $Desc->AddReference('User', 'User'); 151 $Desc->AddReference('Task', 'Task'); 152 return $Desc; 153 } 154 }
Note:
See TracChangeset
for help on using the changeset viewer.