Database/src/PostgreSql/Columns/Timestamp.php

23 lines
400 B
PHP
Raw Normal View History

2024-11-08 16:33:44 +01:00
<?php
namespace Nest\Database\PostgreSql\Columns;
use Stringable;
/**
* PostgreSQL date + time column type.
*/
class Timestamp implements Stringable
{
/**
* @param bool $timezone Add timezone to the value.
*/
public function __construct(protected bool $timezone = false)
{}
public function __toString(): string
{
return "timestamp" . ($this->timezone ? " with time zone" : "");
}
}