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

Legend:

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

    r887 r894  
    9898  }
    9999
     100  function GetModels(): array
     101  {
     102    return array(ChatHistory::GetClassName());
     103  }
     104
    100105  function DoStart(): void
    101106  {
     
    103108  }
    104109}
     110
     111class ChatHistory extends Model
     112{
     113  static function GetDesc(): ModelDesc
     114  {
     115    $Desc = new ModelDesc(self::GetClassName());
     116    $Desc->AddString('Nick');
     117    $Desc->AddText('Text');
     118    $Desc->AddDateTime('Time');
     119    $Desc->AddInteger('Color');
     120    $Desc->AddString('RoomName');
     121    $Desc->AddInteger('RoomType');
     122    $Desc->AddString('Host');
     123        return $Desc;
     124  }
     125}
Note: See TracChangeset for help on using the changeset viewer.