Changeset 894 for trunk/Packages/Common
- Timestamp:
- Jan 5, 2021, 10:30:31 PM (4 years ago)
- Location:
- trunk/Packages/Common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/AppModule.php
r893 r894 223 223 else if ($Column->Type == ModelColumnType::Boolean) $Query .= 'tinyint(1)'; 224 224 else if ($Column->Type == ModelColumnType::Date) $Query .= 'date'; 225 else if ($Column->Type == ModelColumnType::BigInt) $Query .= 'bigint(20)'; 225 226 else if ($Column->Type == ModelColumnType::Enum) 226 227 { -
trunk/Packages/Common/Base.php
r891 r894 20 20 $this->System = &$System; 21 21 $this->Database = &$System->Database; 22 } 23 24 static function GetClassName() 25 { 26 return get_called_class(); 22 27 } 23 28 } … … 76 81 { 77 82 $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); 78 90 $this->Columns[] = $Result; 79 91 return $Result; … … 137 149 const Date = 7; 138 150 const Enum = 8; 151 const BigInt = 9; 139 152 } 140 153 … … 230 243 } 231 244 245 class 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 232 262 class ModelColumnDateTime extends ModelColumn 233 263 {
Note:
See TracChangeset
for help on using the changeset viewer.