Changeset 923 for trunk


Ignore:
Timestamp:
Mar 28, 2022, 12:17:44 AM (3 years ago)
Author:
chronos
Message:
  • Modified: Improved model definitions.
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Form/Form.php

    r922 r923  
    1919SQL - SQL dotaz pro zjištění hodnoty, #Id bude nahrazeno Id aktuální položky
    2020*/
     21class FormItem
     22{
     23  public string $Type;
     24  public string $Caption;
     25  public string $Default;
     26  public bool $Null;
     27  public bool $NotInList;
     28  public bool $Hidden;
     29  public bool $Filter;
     30  public string $Suffix;
     31  public string $Description;
     32  public bool $ReadOnly;
     33  public bool $Required;
     34  public string $SQL;
     35}
    2136
    2237class Form
  • trunk/Modules/Finance/FinanceModels.php

    r901 r923  
    261261  {
    262262    $Desc = new ModelDesc(self::GetClassName());
    263     $Desc->AddString('Name');
    264263    $Desc->AddDate('TimeCreate');
     264    $Desc->AddString('Name');
    265265    return $Desc;
    266266  }
     
    330330  {
    331331    $Desc = new ModelDesc(self::GetClassName());
    332     $Desc->AddString('Code');
     332    $Column = $Desc->AddString('Code');
     333    $Column->MaxLength = 3;
    333334    $Desc->AddString('Name');
    334335    $Desc->AddString('Symbol');
  • trunk/Modules/Network/NetworkModels.php

    r921 r923  
    348348  {
    349349    $Desc = new ModelDesc(self::GetClassName());
    350     $Desc->AddString('MAC'); // size=17
     350    $Column = $Desc->AddString('MAC');
     351    $Column->MaxLength = 17;
    351352    return $Desc;
    352353  }
  • trunk/Modules/Stock/Stock.php

    r916 r923  
    303303  {
    304304    $Desc = new ModelDesc(self::GetClassName());
     305    $Desc->AddString('Name');
    305306    $Desc->AddReference('Location', Member::GetClassName());
    306307    return $Desc;
     
    352353  {
    353354    $Desc = new ModelDesc(self::GetClassName());
     355    $Desc->AddReference('StockSerialNumber', StockSerialNumber::GetClassName());
    354356    $Desc->AddDateTime('Time');
    355     $Desc->AddReference('StockSerialNumber', StockSerialNumber::GetClassName());
    356357    $Desc->AddText('Text');
    357358    return $Desc;
  • trunk/Modules/System/SystemModels.php

    r899 r923  
    66  {
    77    $Desc = new ModelDesc(self::GetClassName());
     8    $Desc->AddString('Unit');
    89    $Desc->AddString('Name');
    9     $Desc->AddString('Unit');
    1010    return $Desc;
    1111  }
     
    1818    $Desc = new ModelDesc(self::GetClassName());
    1919    $Desc->AddString('Title');
     20    $Desc->AddReference('Type', ActionType::GetClassName());
    2021    $Desc->AddString('URL');
     22    $Desc->AddReference('Group', ActionGroup::GetClassName());
    2123    $Desc->AddReference('Icon', ActionIcon::GetClassName());
    22     $Desc->AddReference('Type', ActionType::GetClassName());
    23     $Desc->AddReference('Group', ActionGroup::GetClassName());
    2424    $Desc->AddReference('PermissionOperation', PermissionOperation::GetClassName());
    25     $Desc->AddBoolean('Enable');
     25    $Column = $Desc->AddBoolean('Enable');
     26    $Column->Default = true;
    2627    return $Desc;
    2728  }
  • trunk/Packages/Common/ModelDesc.php

    r899 r923  
    179179{
    180180  public ?string $Default;
     181  public int $MaxLength;
    181182
    182183  function __construct(string $Name)
     
    185186    $this->HasDefault = false;
    186187    $this->Default = null;
     188    $this->MaxLength = 255;
    187189  }
    188190
Note: See TracChangeset for help on using the changeset viewer.