web-base/Core/Driver/SQL/Column/NumericColumn.class.php

30 lines
713 B
PHP
Raw Normal View History

2022-06-17 20:53:35 +02:00
<?php
2022-11-18 18:06:46 +01:00
namespace Core\Driver\SQL\Column;
2022-06-17 20:53:35 +02:00
class NumericColumn extends Column {
protected string $type;
private ?int $totalDigits;
private ?int $decimalDigits;
public function __construct(string $name, bool $nullable, $defaultValue = NULL, ?int $totalDigits = null, ?int $decimalDigits = null) {
parent::__construct($name, $nullable, $defaultValue);
$this->totalDigits = $totalDigits;
$this->decimalDigits = $decimalDigits;
$this->type = "NUMERIC";
}
public function getDecimalDigits(): ?int {
return $this->decimalDigits;
}
public function getTotalDigits(): ?int {
return $this->totalDigits;
}
public function getTypeName(): string {
return $this->type;
}
}