[AUTOGENERATED][DB][File][GroupJoinQueue] Update autogenerated code and add select fields as specified in the previous commit

This commit is contained in:
Hugo Sales 2021-03-10 17:20:42 +00:00
parent 1712782cc5
commit 481027b09b
Signed by untrusted user: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
7 changed files with 27 additions and 37 deletions

View File

@ -38,7 +38,6 @@ use DateTimeInterface;
class ForeignService
{
// {{{ Autocode
private int $id;
private string $name;
private ?string $description;

View File

@ -38,7 +38,6 @@ use DateTimeInterface;
class ForeignSubscription
{
// {{{ Autocode
private int $service;
private int $subscriber;
private int $subscribed;

View File

@ -38,7 +38,6 @@ use DateTimeInterface;
class ForeignUser
{
// {{{ Autocode
private int $id;
private int $service;
private string $uri;

View File

@ -44,7 +44,7 @@ class Activity extends Entity
private string $object_type;
private int $object_id;
private bool $is_local;
private string $source;
private ?string $source;
private DateTimeInterface $created;
public function setId(int $id): self
@ -113,13 +113,13 @@ class Activity extends Entity
return $this->is_local;
}
public function setSource(string $source): self
public function setSource(?string $source): self
{
$this->source = $source;
return $this;
}
public function getSource(): string
public function getSource(): ?string
{
return $this->source;
}

View File

@ -42,14 +42,14 @@ use DateTimeInterface;
class File extends Entity
{
// {{{ Autocode
private int $id;
private ?string $url;
private ?string $url_hash;
private ?string $file_hash;
private ?int $actor_id;
private ?int $gsactor_id;
private ?string $mimetype;
private ?string $title;
private ?string $filename;
private ?bool $is_local;
private ?bool $is_nsfw;
private ?bool $is_url_protected;
@ -99,15 +99,15 @@ class File extends Entity
return $this->file_hash;
}
public function setActorId(?int $actor_id): self
public function setGSActorId(?int $gsactor_id): self
{
$this->actor_id = $actor_id;
$this->gsactor_id = $gsactor_id;
return $this;
}
public function getActorId(): ?int
public function getGSActorId(): ?int
{
return $this->actor_id;
return $this->gsactor_id;
}
public function setMimetype(?string $mimetype): self
@ -132,6 +132,17 @@ class File extends Entity
return $this->title;
}
public function setFilename(?string $filename): self
{
$this->filename = $filename;
return $this;
}
public function getFilename(): ?string
{
return $this->filename;
}
public function setIsLocal(?bool $is_local): self
{
$this->is_local = $is_local;
@ -181,11 +192,6 @@ class File extends Entity
const URLHASH_ALGO = 'sha256';
const FILEHASH_ALGO = 'sha256';
public function getFileName(): string
{
return $this->file_hash;
}
/**
* Delete this file and by default all the associated entities (avatar and/or thumbnails, which this owns)
*/

View File

@ -39,20 +39,20 @@ use DateTimeInterface;
class GSActorTagFollow extends Entity
{
// {{{ Autocode
private int $gsactor_tag_id;
private int $gsactor_tag;
private int $gsactor_id;
private DateTimeInterface $created;
private DateTimeInterface $modified;
public function setGSActorTagId(int $gsactor_tag_id): self
public function setGSActorTag(int $gsactor_tag): self
{
$this->gsactor_tag_id = $gsactor_tag_id;
$this->gsactor_tag = $gsactor_tag;
return $this;
}
public function getGSActorTagId(): int
public function getGSActorTag(): int
{
return $this->gsactor_tag_id;
return $this->gsactor_tag;
}
public function setGSActorId(int $gsactor_id): self

View File

@ -20,7 +20,6 @@
namespace App\Entity;
use App\Core\Entity;
use DateTimeInterface;
/**
* Entity for Queue on joining a group
@ -41,7 +40,6 @@ class GroupJoinQueue extends Entity
// {{{ Autocode
private int $gsactor_id;
private int $group_id;
private DateTimeInterface $created;
public function setGSActorId(int $gsactor_id): self
{
@ -65,17 +63,6 @@ class GroupJoinQueue extends Entity
return $this->group_id;
}
public function setCreated(DateTimeInterface $created): self
{
$this->created = $created;
return $this;
}
public function getCreated(): DateTimeInterface
{
return $this->created;
}
// }}} Autocode
public static function schemaDef(): array
@ -89,8 +76,8 @@ class GroupJoinQueue extends Entity
],
'primary key' => ['gsactor_id', 'group_id'],
'indexes' => [
'group_join_queue_gsactor_id_created_idx' => ['gsactor_id', 'created'],
'group_join_queue_group_id_created_idx' => ['group_id', 'created'],
'group_join_queue_gsactor_id_idx' => ['gsactor_id'],
'group_join_queue_group_id_idx' => ['group_id'],
],
];
}