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/Packages/Common/Base.php

    r891 r894  
    2020    $this->System = &$System;
    2121    $this->Database = &$System->Database;
     22  }
     23
     24  static function GetClassName()
     25  {
     26    return get_called_class();
    2227  }
    2328}
     
    7681  {
    7782    $Result = new ModelColumnInteger($Name);
     83    $this->Columns[] = $Result;
     84    return $Result;
     85  }
     86
     87  function AddBigInt(string $Name): ModelColumnBigInt
     88  {
     89    $Result = new ModelColumnBigInt($Name);
    7890    $this->Columns[] = $Result;
    7991    return $Result;
     
    137149  const Date = 7;
    138150  const Enum = 8;
     151  const BigInt = 9;
    139152}
    140153
     
    230243}
    231244
     245class ModelColumnBigInt extends ModelColumn
     246{
     247  public ?int $Default;
     248
     249  function __construct(string $Name)
     250  {
     251    parent::__construct($Name, ModelColumnType::BigInt);
     252    $this->HasDefault = false;
     253    $this->Default = null;
     254  }
     255
     256  function GetDefault(): ?string
     257  {
     258    return $this->Default;
     259  }
     260}
     261
    232262class ModelColumnDateTime extends ModelColumn
    233263{
Note: See TracChangeset for help on using the changeset viewer.