[ENTITY] Add 'normalized_nickname' to GSActor, the result of Nickname::normalize, so we can make sure we don't have very similar nicknames duplicated

This commit is contained in:
2021-05-05 12:19:10 +00:00
parent f2727f9327
commit bd249b508b
3 changed files with 44 additions and 25 deletions

View File

@@ -19,7 +19,9 @@
namespace App\Entity;
use App\Core\DB\DB;
use App\Core\Entity;
use DateTimeInterface;
/**
@@ -66,31 +68,35 @@ class LocalGroup extends Entity
return $this->nickname;
}
public function setCreated(\DateTimeInterface $created): self
public function setCreated(DateTimeInterface $created): self
{
$this->created = $created;
return $this;
}
public function getCreated(): \DateTimeInterface
public function getCreated(): DateTimeInterface
{
return $this->created;
}
public function setModified(\DateTimeInterface $modified): self
public function setModified(DateTimeInterface $modified): self
{
$this->modified = $modified;
return $this;
}
public function getModified(): \DateTimeInterface
public function getModified(): DateTimeInterface
{
return $this->modified;
}
// }}} Autocode
public function getActor()
{
return DB::find('gsactor', ['id' => $this->group_id]);
}
public static function schemaDef(): array
{
return [