Ignore:
Timestamp:
Jan 5, 2021, 10:30:31 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Further improved models initialization system.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/NetworkConfig/NetworkConfig.php

    r888 r894  
    1717  }
    1818
    19   function DoInstall(): void
     19  function GetModels(): array
    2020  {
    21   }
    22 
    23   function DoUnInstall(): void
    24   {
     21    return array(NetworkConfigurationLog::GetClassName(), NetworkConfiguration::GetClassName());
    2522  }
    2623
     
    109106  }
    110107}
     108
     109class NetworkConfiguration extends Model
     110{
     111  static function GetDesc(): ModelDesc
     112  {
     113    $Desc = new ModelDesc(self::GetClassName());
     114    $Desc->AddString('Caption');
     115    $Desc->AddString('SysName');
     116    $Desc->AddBoolean('Changed');
     117    $Desc->AddDateTime('LastTime');
     118    $Desc->AddInteger('ExecutionTime');
     119    $Desc->AddBoolean('Enabled');
     120    $Desc->AddInteger('Period');
     121    return $Desc;
     122  }
     123}
     124
     125class NetworkConfigurationLog extends Model
     126{
     127  static function GetDesc(): ModelDesc
     128  {
     129    $Desc = new ModelDesc(self::GetClassName());
     130    $Desc->AddString('Caption');
     131    $Desc->AddText('Log');
     132    return $Desc;
     133  }
     134}
Note: See TracChangeset for help on using the changeset viewer.