for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace KitLoong\MigrationsGenerator\Schema\SQLSrv;
class Column
{
/** @var string */
private $name;
private $type;
/** @var int */
private $length = 0;
/** @var bool */
private $notnull;
/** @var string|null */
private $default;
private $scale = 0;
private $precision = 0;
private $autoincrement = false;
private $collation;
private $comment;
/**
* Column constructor.
* @param string $name
* @param string $type
* @param int $length
* @param bool $notnull
* @param int $scale
* @param int $precision
* @param bool $autoincrement
* @param string|null $default
* @param string|null $collation
* @param string|null $comment
*/
public function __construct(
string $name,
string $type,
int $length,
bool $notnull,
int $scale,
int $precision,
bool $autoincrement,
?string $default,
?string $collation,
?string $comment
) {
$this->name = $name;
$this->type = $type;
$this->length = $length;
$this->notnull = $notnull;
$this->default = $default;
$this->scale = $scale;
$this->precision = $precision;
$this->autoincrement = $autoincrement;
$this->collation = $collation;
$this->comment = $comment;
}
* @return string
public function getName(): string
return $this->name;
public function getType(): string
return $this->type;
* @return int
public function getLength(): int
return $this->length;
* @return bool
public function isNotnull(): bool
return $this->notnull;
* @return string|null
public function getDefault(): ?string
return $this->default;
public function getScale(): int
return $this->scale;
public function getPrecision(): int
return $this->precision;
public function isAutoincrement(): bool
return $this->autoincrement;
public function getCollation(): ?string
return $this->collation;
public function getComment(): ?string
return $this->comment;