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

24 lines
510 B
PHP
Raw Permalink Normal View History

2020-04-02 00:02:51 +02:00
<?php
2022-11-18 18:06:46 +01:00
namespace Core\Driver\SQL\Column;
2020-04-02 00:02:51 +02:00
class IntColumn extends Column {
2021-12-08 16:53:43 +01:00
protected string $type;
private bool $unsigned;
public function __construct(string $name, bool $nullable = false, $defaultValue = NULL, bool $unsigned = false) {
2020-04-02 00:02:51 +02:00
parent::__construct($name, $nullable, $defaultValue);
2021-12-08 16:53:43 +01:00
$this->type = "INTEGER";
$this->unsigned = $unsigned;
}
public function isUnsigned(): bool {
return $this->unsigned;
2020-04-02 00:02:51 +02:00
}
2021-12-08 16:53:43 +01:00
public function getType(): string {
return $this->type;
}
2020-04-02 00:02:51 +02:00
}