Changeset 890 for trunk/Modules/File/File.php
- Timestamp:
- Dec 29, 2020, 11:11:12 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Modules/File/File.php
r887 r890 11 11 parent::__construct($System); 12 12 $this->FilesDir = ''; 13 } 14 15 static function GetDesc(): ModelDesc 16 { 17 $Desc = new ModelDesc('File'); 18 $Desc->AddString('Name'); 19 $Desc->AddInteger('Size'); 20 $Column = $Desc->AddReference('Directory', 'FileDirectory'); 21 $Column->Nullable = true; 22 $Desc->AddDateTime('Time'); 23 return $Desc; 13 24 } 14 25 … … 104 115 } 105 116 117 class FileDirectory extends Model 118 { 119 static function GetDesc(): ModelDesc 120 { 121 $Desc = new ModelDesc('FileDirectory'); 122 $Desc->AddString('Name'); 123 $Column = $Desc->AddReference('Parent', 'FileDirectory'); 124 $Column->Nullable = true; 125 return $Desc; 126 } 127 } 128 106 129 class PageFileCheck extends Page 107 130 { … … 173 196 function DoInstall(): void 174 197 { 198 $this->InstallModel(FileDirectory::GetDesc()); 199 $this->InstallModel(File::GetDesc()); 175 200 } 176 201 177 202 function DoUninstall(): void 178 203 { 204 $this->UninstallModel(File::GetDesc()); 205 $this->UninstallModel(FileDirectory::GetDesc()); 179 206 } 180 207
Note:
See TracChangeset
for help on using the changeset viewer.