Auth, Login, Home, Venta->Listados->Precios

This commit is contained in:
Juan Pablo Vial
2023-07-24 20:55:26 -04:00
parent d9d5a15376
commit 1a7b10ce3c
130 changed files with 4302 additions and 0 deletions

28
app/src/Model/User.php Normal file
View File

@ -0,0 +1,28 @@
<?php
namespace Incoviba\Model;
use Incoviba\Common\Ideal;
use function password_verify;
class User extends Ideal\Model
{
public string $name;
public string $password;
public bool $enabled;
public function validate(string $provided_password): bool
{
return password_verify($provided_password, $this->password);
}
public function isAdmin(): bool
{
return false;
}
public function jsonSerialize(): mixed
{
return array_merge(parent::jsonSerialize(), [
'name' => $this->name
]);
}
}