mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 07:10:29 -04:00
Change 'timestamp' properties on objects to more descriptive names
This commit is contained in:
parent
18f761929a
commit
dbefba6b94
32 changed files with 74 additions and 74 deletions
|
@ -12,7 +12,7 @@ class User extends PropertiesBase{
|
|||
protected $DisplayName = null;
|
||||
public $Email;
|
||||
protected $DisplayEmail;
|
||||
public $Timestamp;
|
||||
public $Created;
|
||||
public $Uuid;
|
||||
|
||||
public static function Get(?int $userId): User{
|
||||
|
@ -46,10 +46,10 @@ class User extends PropertiesBase{
|
|||
public function Create(): void{
|
||||
$uuid = Uuid::uuid4();
|
||||
$this->Uuid = $uuid->toString();
|
||||
$this->Timestamp = new DateTime();
|
||||
$this->Created = new DateTime();
|
||||
|
||||
try{
|
||||
Db::Query('INSERT into Users (Email, Name, Uuid, Timestamp) values (?, ?, ?, ?);', [$this->Email, $this->Name, $this->Uuid, $this->Timestamp]);
|
||||
Db::Query('INSERT into Users (Email, Name, Uuid, Created) values (?, ?, ?, ?);', [$this->Email, $this->Name, $this->Uuid, $this->Created]);
|
||||
}
|
||||
catch(PDOException $ex){
|
||||
if($ex->errorInfo[1] == 1062){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue