Partage d'export enregistré et génération asynchrone des exports

This commit is contained in:
2025-07-08 13:53:25 +00:00
parent c4cc0baa8e
commit 8bc16dadb0
447 changed files with 14134 additions and 3854 deletions

View File

@@ -21,6 +21,19 @@ use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Represents a user group entity in the system.
*
* This class is used for managing user groups, including their relationships
* with users, administrative users, and additional metadata such as colors and labels.
*
* Groups may be configured to have mutual exclusion properties based on an
* exclusion key. This ensures that groups sharing the same key cannot coexist
* in certain relationship contexts.
*
* Groups may be related to a UserJob. In that case, a cronjob task ensure that the members of the groups are
* automatically synced with this group. Such groups are also automatically created by the cronjob.
*/
#[ORM\Entity]
#[ORM\Table(name: 'chill_main_user_group')]
// this discriminator key is required for automated denormalization
@@ -71,6 +84,13 @@ class UserGroup
#[Assert\Email]
private string $email = '';
/**
* UserJob to which the group is related.
*/
#[ORM\ManyToOne(targetEntity: UserJob::class)]
#[ORM\JoinColumn(nullable: true)]
private ?UserJob $userJob = null;
public function __construct()
{
$this->adminUsers = new ArrayCollection();
@@ -209,6 +229,21 @@ class UserGroup
return '' !== $this->email;
}
public function hasUserJob(): bool
{
return null !== $this->userJob;
}
public function getUserJob(): ?UserJob
{
return $this->userJob;
}
public function setUserJob(?UserJob $userJob): void
{
$this->userJob = $userJob;
}
/**
* Checks if the current object is an instance of the UserGroup class.
*