Discord Eraser Bot

User
in package
implements UserInterface uses Identifiable, DiscordIdentifiable, Timestampable

FinalYes
Attributes
#[Entity]
$repositoryClass: \App\Repository\UserRepository::class
#[Table]
$name: '`user`'
#[UniqueConstraint]
$name: 'UNIQ_IDENTIFIER_USER_DISCORD_ID'
$fields: [self::IDENTIFIER_PROPERTY_NAME]

Table of Contents

Interfaces

UserInterface

Constants

AUTHORIZED_GUILDS_SESSION_KEY  = 'authorized_guilds'
IDENTIFIER_PROPERTY_NAME  = 'discordId'
ROLE_SUPER_ADMIN  = 'ROLE_SUPER_ADMIN'
ROLE_USER  = 'ROLE_USER'

Properties

$createdAt  : DateTimeImmutable|null
$discordId  : int|string|null
$id  : int|null
$roles  : array<string|int, string>
$updatedAt  : DateTimeImmutable|null

Methods

eraseCredentials()  : void
getCreatedAt()  : DateTimeImmutable|null
getDiscordId()  : int|string|null
getId()  : int|null
getRoles()  : array<string|int, string>
getUpdatedAt()  : DateTimeImmutable|null
getUserIdentifier()  : string
setCreatedAt()  : void
setDiscordId()  : void
setRoles()  : void
setUpdatedAt()  : void

Constants

AUTHORIZED_GUILDS_SESSION_KEY

public mixed AUTHORIZED_GUILDS_SESSION_KEY = 'authorized_guilds'

IDENTIFIER_PROPERTY_NAME

public mixed IDENTIFIER_PROPERTY_NAME = 'discordId'

ROLE_SUPER_ADMIN

public mixed ROLE_SUPER_ADMIN = 'ROLE_SUPER_ADMIN'

ROLE_USER

public mixed ROLE_USER = 'ROLE_USER'

Properties

$createdAt

private DateTimeImmutable|null $createdAt = null
Attributes
#[Column]
$name: 'created_at'
$type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE
#[Timestampable]
$on: 'create'

$discordId

private int|string|null $discordId = null
Attributes
#[Column]
$name: 'discord_id'
$type: \Doctrine\DBAL\Types\Types::BIGINT
#[NotNull]
#[Regex]
$pattern: '/^[1-9]\d{16,18}$/'
$message: 'This value is not a Discord Snowflake.'
$normalizer: 'strval'

$id

private int|null $id = null
Attributes
#[Column]
#[GeneratedValue]
$strategy: 'IDENTITY'
#[Id]

$roles

private array<string|int, string> $roles = []
Attributes
#[AtLeastOneOf]
[new \Symfony\Component\Validator\Constraints\Count(exactly: 0), new \Symfony\Component\Validator\Constraints\Sequentially([new \Symfony\Component\Validator\Constraints\Count(exactly: 1), new \Symfony\Component\Validator\Constraints\Expression(expression: "'" . self::ROLE_SUPER_ADMIN . "' in value", message: "This collection should contain only '" . self::ROLE_SUPER_ADMIN . "'.")])]
#[Column]
$type: \Doctrine\DBAL\Types\Types::JSON

$updatedAt

private DateTimeImmutable|null $updatedAt = null
Attributes
#[Column]
$name: 'updated_at'
$type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE
#[Timestampable]
$on: 'update'

Methods

eraseCredentials()

public eraseCredentials() : void
Tags
codeCoverageIgnore

getCreatedAt()

public getCreatedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|null

getDiscordId()

public getDiscordId() : int|string|null
Return values
int|string|null

getId()

public getId() : int|null
Return values
int|null

getRoles()

public getRoles() : array<string|int, string>
Return values
array<string|int, string>

getUpdatedAt()

public getUpdatedAt() : DateTimeImmutable|null
Return values
DateTimeImmutable|null

getUserIdentifier()

public getUserIdentifier() : string
Return values
string

setCreatedAt()

public setCreatedAt(DateTimeImmutable $createdAt) : void
Parameters
$createdAt : DateTimeImmutable

setDiscordId()

public setDiscordId(int|string $discordId) : void
Parameters
$discordId : int|string

setRoles()

public setRoles(array<string|int, string> $roles) : void
Parameters
$roles : array<string|int, string>

setUpdatedAt()

public setUpdatedAt(DateTimeImmutable $updatedAt) : void
Parameters
$updatedAt : DateTimeImmutable

        
On this page

Search results