Symfony 6.4 - Update ApiResource Entity classes

- Update imports
- replace annotations with attributes
This commit is contained in:
Clemente Raposo 2024-01-11 17:02:20 +00:00
parent 9749583a26
commit 5e2a39c089
17 changed files with 1135 additions and 901 deletions

View file

@ -28,74 +28,111 @@
namespace App\Data\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GraphQl\Mutation;
use ApiPlatform\Metadata\GraphQl\Query;
use App\Data\Resolver\RecordItemResolver;
/**
* @ApiResource(
* attributes={"security"="is_granted('ROLE_USER')"},
* itemOperations={
* "get"={"path"="/record/{id}"}
* },
* collectionOperations={},
* graphql={
* "get"={
* "item_query"=RecordItemResolver::class,
* "args"={
* "module"={"type"="String!"},
* "record"={"type"="String!"},
* }
* },
* "save"={
* "validate"=false,
* "args"={
* "_id"={"type"="String", "description"="id"},
* "identifier"={"type"="String", "description"="id"},
* "module"={"type"="String!", "description"="module"},
* "attributes"={"type"="Iterable", "description"="attributes"}
* }
* },
* },
* )
*/
#[ApiResource(
operations: [
new Get(
uriTemplate: "/record/{id}",
security: "is_granted('ROLE_USER')"
)
],
security: "is_granted('ROLE_USER')",
graphQlOperations: [
new Query(
resolver: RecordItemResolver::class,
args: [
'module' => ['type' => 'String!'],
'record' => ['type' => 'Int'],
],
security: "is_granted('ROLE_USER')"
),
new Mutation(
args: [
'_id' => ['type' => 'String', 'description' => 'id'],
'identifier' => ['type' => 'String', 'description' => 'id'],
'module' => ['type' => 'String!', 'description' => 'module'],
'attributes' => ['type' => 'Iterable', 'description' => 'attributes'],
],
security: "is_granted('ROLE_USER')",
validate: false,
name: 'save'
)
]
)]
class Record
{
/**
* @ApiProperty(identifier=true)
* @var string|null
*/
protected $id;
#[ApiProperty(
identifier: true,
openapiContext: [
'type' => 'string',
'description' => 'The id',
]
)]
protected ?string $id;
/**
* @ApiProperty
* @var string|null
*/
protected $module;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'The module',
]
)]
protected ?string $module;
/**
* @ApiProperty
* @var string|null
*/
protected $type;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'The type',
]
)]
protected ?string $type;
/**
* @ApiProperty
* @var array|null
*/
protected $attributes;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The attributes',
]
)]
protected ?array $attributes;
/**
* @ApiProperty
* @var array|null
*/
protected $acls;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The acls',
]
)]
protected ?array $acls;
/**
* @ApiProperty
* @var bool|null
*/
protected $favorite;
#[ApiProperty(
openapiContext: [
'type' => 'bool',
'description' => 'The favorite',
]
)]
protected ?bool $favorite;
/**
* @return array

View file

@ -28,96 +28,89 @@
namespace App\Data\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GraphQl\Query;
use App\Data\Resolver\RecordListResolver;
use App\Statistics\Resolver\StatisticsItemResolver;
/**
* @ApiResource(
* attributes={"security"="is_granted('ROLE_USER')"},
* itemOperations={
* "get"={"path"="/record-list/{id}"}
* },
* collectionOperations={},
* graphql={
* "get"={
* "item_query"=RecordListResolver::class,
* "args"={
* "module"={"type"="String!"},
* "limit"={"type"="Int"},
* "offset"={"type"="Int"},
* "criteria"={"type"="Iterable" , "description"="search criteria"},
* "sort"={"type"="Iterable" , "description"="sort"}
* }
* },
* },
* )
*/
#[ApiResource(
operations: [
new Get(
uriTemplate: "/record-list/{id}",
security: "is_granted('ROLE_USER')"
)
],
security: "is_granted('ROLE_USER')",
graphQlOperations: [
new Query(
resolver: RecordListResolver::class,
args: [
'module' => ['type' => 'String!'],
'limit' => ['type' => 'Int'],
'offset' => ['type' => 'Int'],
'criteria' => ['type' => 'Iterable', 'description'=>'search criteria'],
'sort' => ['type' => 'Iterable', 'description'=>'sort'],
],
security: "is_granted('ROLE_USER')"
)
]
)]
class RecordList
{
/**
* RecordList data
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The list-view data",
* },
* }
* )
*/
public $records;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The list-view data',
]
)]
public array $records;
/**
* RecordList metadata
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The list metadata",
* },
* }
* )
*/
public $meta;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The list metadata',
]
)]
public array $meta;
/**
* RecordList filters
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The list-view filters",
* },
* }
* )
*/
public $filters;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The list-view filters',
]
)]
public array $filters;
/**
* The module
*
* @var string
*
* @ApiProperty(
* identifier=true,
* attributes={
* "openapi_context"={
* "type"="string",
* "description"="The module.",
* "example"="Accounts"
* }
* },
*
* )
*/
protected $id;
#[ApiProperty(
identifier: true,
openapiContext: [
'type' => 'string',
'description' => 'The module',
]
)]
protected string $id;
/**
* @return string

View file

@ -28,56 +28,49 @@
namespace App\FieldDefinitions\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GraphQl\Query;
/**
* @ApiResource(
* attributes={"security"="is_granted('ROLE_USER')"},
* routePrefix="/vardef",
* itemOperations={
* "get"
* },
* graphql={
* "item_query",
* }
* )
*/
#[ApiResource(
operations: [
new Get(security: "is_granted('ROLE_USER')"),
],
routePrefix: "/vardef",
security: "is_granted('ROLE_USER')",
graphQlOperations: [
new Query(security: "is_granted('ROLE_USER')")
]
)]
class FieldDefinition
{
/**
* Module vardef metadata
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The module metadata",
* },
* }
* )
*/
public $vardef;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The vardef metadata',
]
)]
public array $vardef;
/**
* The module
*
* @var string
*
* @ApiProperty(
* identifier=true,
* attributes={
* "openapi_context"={
* "type"="string",
* "description"="The module vardef.",
* "example"="Accounts"
* }
* },
*
* )
*/
protected $id;
#[ApiProperty(
identifier: true,
openapiContext: [
'type' => 'string',
'description' => 'The module',
]
)]
protected string $id;
/**
* @return string

View file

@ -26,38 +26,46 @@
*/
namespace App\Languages\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GraphQl\Query;
/**
* @ApiResource(
* attributes={"security"="is_granted('ROLE_USER')"},
* itemOperations={
* "get"
* },
* collectionOperations={
* },
* graphql={
* "item_query",
* },
* )
*/
#[ApiResource(
operations: [
new Get(security: "is_granted('ROLE_USER')"),
],
security: "is_granted('ROLE_USER')",
graphQlOperations: [
new Query(security: "is_granted('ROLE_USER')")
]
)]
class AppListStrings
{
/**
* @ApiProperty(identifier=true)
* @var string|null
*/
protected $id;
#[ApiProperty(
identifier: true,
openapiContext: [
'type' => 'string',
'description' => 'The id',
]
)]
protected ?string $id;
/**
* @ApiProperty
* @var array|null
*/
protected $items;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'items',
]
)]
protected ?array $items;
/**
* Get Id

View file

@ -26,37 +26,45 @@
*/
namespace App\Languages\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GraphQl\Query;
/**
* @ApiResource(
* itemOperations={
* "get"
* },
* collectionOperations={
* },
* graphql={
* "item_query",
* },
* )
*/
#[ApiResource(
operations: [
new Get()
],
graphQlOperations: [
new Query()
]
)]
class AppStrings
{
/**
* @ApiProperty(identifier=true)
* @var string|null
*/
protected $id;
#[ApiProperty(
identifier: true,
openapiContext: [
'type' => 'string',
'description' => 'The id',
]
)]
protected ?string $id;
/**
* @ApiProperty
* @var array|null
*/
protected $items;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'items',
]
)]
protected ?array $items;
/**
* Get Id

View file

@ -28,35 +28,44 @@
namespace App\Languages\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GraphQl\Query;
/**
* @ApiResource(
* attributes={"security"="is_granted('ROLE_USER')"},
* itemOperations={
* "get"
* },
* collectionOperations={
* },
* graphql={
* "item_query",
* },
* )
*/
#[ApiResource(
operations: [
new Get(security: "is_granted('ROLE_USER')"),
],
security: "is_granted('ROLE_USER')",
graphQlOperations: [
new Query(security: "is_granted('ROLE_USER')")
]
)]
class ModStrings
{
/**
* @ApiProperty(identifier=true)
* @var string|null
*/
protected $id;
#[ApiProperty(
identifier: true,
openapiContext: [
'type' => 'string',
'description' => 'the id',
]
)]
protected ?string $id;
/**
* @ApiProperty
* @var array|null
*/
protected $items;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'items',
]
)]
protected ?array $items;
/**
* Get Id

View file

@ -27,134 +27,113 @@
namespace App\Metadata\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GraphQl\Query;
/**
* @ApiResource(
* itemOperations={
* "get"={"path"="/app-metadata/{id}"}
* },
* collectionOperations={
* },
* graphql={
* "item_query",
* }
* )
*/
#[ApiResource(
operations: [
new Get(
uriTemplate: '/app-metadata/{id}'
),
],
graphQlOperations: [
new Query()
]
)]
class AppMetadata
{
/**
* System configs
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The system configs",
* },
* }
* )
*/
public $systemConfig;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'system configs',
]
)]
public array $systemConfig;
/**
* User preferences
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The user preferences",
* },
* }
* )
*/
public $userPreferences;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'user preferences',
]
)]
public array $userPreferences;
/**
* Language strings
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The language strings",
* },
* }
* )
*/
public $language;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'language',
]
)]
public array $language;
/**
* Theme images
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The theme images",
* },
* }
* )
*/
public $themeImages;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'theme images',
]
)]
public array $themeImages;
/**
* Navigation definitions
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The navigation definitions",
* },
* }
* )
*/
public $navigation;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'the navigation definitions',
]
)]
public array $navigation;
/**
* Module metadata
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The module metadata",
* },
* }
* )
*/
public $moduleMetadata;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The module metadata',
]
)]
public array $moduleMetadata;
/**
* Minimal module metadata
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The module metadata",
* },
* }
* )
*/
public $minimalModuleMetadata;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'the module metadata',
]
)]
public array $minimalModuleMetadata;
/**
* Global Recently Viewed Metadata
@ -176,36 +155,28 @@ class AppMetadata
* Admin Metadata
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The admin metadata",
* },
* }
* )
*/
public $adminMetadata;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The admin metadata',
]
)]
public array $adminMetadata;
/**
* The module
*
* @var string
*
* @ApiProperty(
* identifier=true,
* attributes={
* "openapi_context"={
* "type"="string",
* "description"="The module.",
* "example"="Accounts"
* }
* },
*
* )
*/
protected $id;
#[ApiProperty(
identifier: true,
openapiContext: [
'type' => 'string',
'description' => 'the module',
]
)]
protected string $id;
/**
* @return string

View file

@ -27,166 +27,142 @@
namespace App\Metadata\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GraphQl\Query;
/**
* @ApiResource(
* attributes={"security"="is_granted('ROLE_USER')"},
* itemOperations={
* "get"={"path"="/module-metadata/{id}"}
* },
* collectionOperations={
* },
* graphql={
* "item_query",
* }
* )
*/
#[ApiResource(
operations: [
new Get(
uriTemplate: '/module-metadata/{id}',
security: "is_granted('ROLE_USER')"
),
],
security: "is_granted('ROLE_USER')",
graphQlOperations: [
new Query(security: "is_granted('ROLE_USER')")
]
)]
class ModuleMetadata
{
/**
* Record View metadata
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The record-view metadata",
* },
* }
* )
*/
public $recordView;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The record-view metadata',
]
)]
public array $recordView;
/**
* Edit View metadata
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The edit-view metadata",
* },
* }
* )
*/
public $editView;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The edit-view metadata',
]
)]
public array $editView;
/**
* List View metadata
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The list-view metadata",
* },
* }
* )
*/
public $listView;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The list-view metadata',
]
)]
public array $listView;
/**
* Search metadata
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The search metadata",
* },
* }
* )
*/
public $search;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The search metadata',
]
)]
public array $search;
/**
* Subpanel metadata
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The subpanel metadata",
* },
* }
* )
*/
public $subpanel;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The subpanel metadata',
]
)]
public array $subpanel;
/**
* MassUpdate metadata
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The massUpdate metadata",
* },
* }
* )
*/
public $massUpdate;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The massUpdate metadata',
]
)]
public array $massUpdate;
/**
* recentlyViewed
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The recently viewed records",
* },
* }
* )
*/
public $recentlyViewed;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The recently viewed records',
]
)]
public array $recentlyViewed;
/**
* Favorites
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The favorite records",
* },
* }
* )
*/
public $favorites;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The favorite records',
]
)]
public array $favorites;
/**
* The module
*
* @var string
*
* @ApiProperty(
* identifier=true,
* attributes={
* "openapi_context"={
* "type"="string",
* "description"="The module.",
* "example"="Accounts"
* }
* },
*
* )
*/
protected $id;
#[ApiProperty(
identifier: true,
openapiContext: [
'type' => 'string',
'description' => 'the module',
]
)]
protected string $id;
/**
* Get EditView Metadata

View file

@ -28,64 +28,110 @@
namespace App\Navbar\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GraphQl\Query;
/**
* @ApiResource(
* attributes={"security"="is_granted('ROLE_USER')"},
* itemOperations={
* "get"
* },
* collectionOperations={
* },
* graphql={
* "item_query"
* }
* )
*/
#[ApiResource(
operations: [
new Get(security: "is_granted('ROLE_USER')"),
],
security: "is_granted('ROLE_USER')",
graphQlOperations: [
new Query(security: "is_granted('ROLE_USER')"),
]
)]
final class Navbar
{
/**
* @ApiProperty(identifier=true)
* @var string|null
*/
public $userID;
#[ApiProperty(
identifier: true,
openapiContext: [
'type' => 'string',
'description' => 'user id',
]
)]
public ?string $userID;
/**
* @var array
* @ApiProperty
*/
public $tabs;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'tabs',
]
)]
public array $tabs;
/**
* @var array
* @ApiProperty
*/
public $groupedTabs;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'groupedTabs',
]
)]
public array $groupedTabs;
/**
* @var array
* @ApiProperty
*/
public $userActionMenu;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'userActionMenu',
]
)]
public array $userActionMenu;
/**
* @var array
* @ApiProperty
*/
public $modules;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'modules',
]
)]
public array $modules;
/**
* @var int
* @ApiProperty
*/
public $maxTabs;
#[ApiProperty(
openapiContext: [
'type' => 'int',
'description' => 'maxTabs',
]
)]
public int $maxTabs;
/**
* @var string
* @ApiProperty
*/
public $type;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'maxTabs',
]
)]
public string $type;
/**
* @var array
*/
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'quickActions',
]
)]
public array $quickActions;
/**
* @return array
@ -105,10 +151,4 @@ final class Navbar
'quickActions' => $this->quickActions,
];
}
/**
* @var array
* @ApiProperty
*/
public $quickActions;
}

View file

@ -25,72 +25,108 @@
* the words "Supercharged by SuiteCRM".
*/
namespace App\Process\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\GraphQl\Mutation;
use ApiPlatform\Metadata\GraphQl\Query;
use ApiPlatform\Metadata\GraphQl\QueryCollection;
use ApiPlatform\Metadata\Put;
/**
* @ApiResource(
* itemOperations={
* "get",
* "put",
* },
* collectionOperations={
* "get"
* },
* graphql={
* "item_query",
* "collection_query",
* "create"
* },
* )
*/
#[ApiResource(
operations: [
new Get(),
new Put(),
new GetCollection()
],
graphQlOperations: [
new Query(),
new QueryCollection(),
new Mutation(name: 'create')
]
)]
class Process
{
/**
* @ApiProperty(identifier=true)
* @var string|null
*/
protected $id;
#[ApiProperty(
identifier: true,
openapiContext: [
'type' => 'string',
'description' => 'The id',
]
)]
protected ?string $id;
/**
* @ApiProperty
* @var string|null
*/
protected $type;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'type',
]
)]
protected ?string $type;
/**
* @ApiProperty
* @var string|null
*/
protected $status;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'status',
]
)]
protected ?string $status;
/**
* @ApiProperty
* @var string[]|null
*/
protected $messages;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'messages',
]
)]
protected ?array $messages;
/**
* @ApiProperty
* @var bool|null
*/
protected $async;
#[ApiProperty(
openapiContext: [
'type' => 'bool',
'description' => 'async',
]
)]
protected ?bool $async;
/**
* @ApiProperty
* @var array|null
*/
protected $options;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'options',
]
)]
protected ?array $options;
/**
* @ApiProperty
* @var array|null
*/
protected $data;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'data',
]
)]
protected ?array $data;
/**
* Get Id

View file

@ -28,99 +28,54 @@
namespace App\Statistics\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GraphQl\Query;
use App\Statistics\Resolver\BatchedStatisticsItemResolver;
/**
* @ApiResource(
* attributes={"security"="is_granted('ROLE_USER')"},
* itemOperations={
* "get"={
* "openapi_context" = {
* "parameters" = {
* {
* "name" = "id",
* "in" = "path",
* "description" = "module name",
* "required" = true
* },
* {
* "name" = "queries",
* "in" = "query",
* "description" = "queries",
* "required" = true,
* "style" = "simple",
* "schema" = {
* "type": "object",
* "additionalProperties" : {
* "type": "object",
* "properties": {
* "key" : {
* "type": "string"
* },
* "context" : {
* "type": "object",
* "properties": {
* "module" : {
* "type": "string",
* "required": false
* },
* "id" : {
* "type": "string",
* "required": false
* },
* "criteria" : {
* "type": "object",
* "required": false,
* "additionalProperties": true
* },
* "sort" : {
* "type": "object",
* "required": false,
* "additionalProperties": true
* },
* }
* },
* "params" : {
* "type": "object",
* "required": false,
* "additionalProperties": true
* },
* }
* }
* }
* },
* }
* }
* }
* },
* collectionOperations={
* },
* graphql={
* "get"={
* "item_query"=BatchedStatisticsItemResolver::class,
* "args"={
* "module"={"type"="String!"},
* "queries"={"type"="Iterable"},
* }
* },
* },
* )
*/
#[ApiResource(
operations: [
new Get(
security: "is_granted('ROLE_USER')"
),
],
security: "is_granted('ROLE_USER')",
graphQlOperations: [
new Query(
resolver: BatchedStatisticsItemResolver::class,
args: [
'module' => ['type' => 'String!'],
'queries' => ['type' => 'Iterable'],
],
security: "is_granted('ROLE_USER')"
),
]
)]
class BatchedStatistics
{
/**
* @ApiProperty(identifier=true)
* @var string|null
*/
protected $id;
#[ApiProperty(
identifier: true,
openapiContext: [
'type' => 'string',
'description' => 'The id',
]
)]
protected ?string $id;
/**
* @ApiProperty
* @var array|null
*/
protected $items;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'items',
]
)]
protected ?array $items;
/**
* @return string|null

View file

@ -26,63 +26,87 @@
*/
namespace App\Statistics\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GraphQl\Query;
use App\Statistics\Resolver\StatisticsItemResolver;
/**
* @ApiResource(
* attributes={"security"="is_granted('ROLE_USER')"},
* itemOperations={
* "get"
* },
* collectionOperations={
* },
* graphql={
* "get"={
* "item_query"=StatisticsItemResolver::class,
* "args"={
* "module"={"type"="String!"},
* "query"={"type"="Iterable"},
* }
* },
* },
* )
*/
#[ApiResource(
operations: [
new Get(security: "is_granted('ROLE_USER')"),
],
security: "is_granted('ROLE_USER')",
graphQlOperations: [
new Query(
resolver: StatisticsItemResolver::class,
args: [
'module' => ['type' => 'String!'],
'query' => ['type' => 'Iterable'],
],
security: "is_granted('ROLE_USER')"
),
]
)]
class Statistic
{
/**
* @ApiProperty(identifier=true)
* @var string|null
*/
protected $id;
#[ApiProperty(
identifier: true,
openapiContext: [
'type' => 'string',
'description' => 'The id',
]
)]
protected ?string $id;
/**
* @ApiProperty
* @var string[]|null
*/
protected $messages;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'messages',
]
)]
protected ?array $messages;
/**
* @ApiProperty
* @var array|null
*/
protected $options;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'options',
]
)]
protected ?array $options;
/**
* @ApiProperty
* @var array|null
*/
protected $data;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'data',
]
)]
protected ?array $data;
/**
* @ApiProperty
* @var array|null
*/
protected $metadata;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'metadata',
]
)]
protected ?array $metadata;
/**
* @return string|null

View file

@ -26,45 +26,60 @@
*/
namespace App\SystemConfig\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\GraphQl\Query;
use ApiPlatform\Metadata\GraphQl\QueryCollection;
/**
* @ApiResource(
* itemOperations={
* "get"
* },
* collectionOperations={
* "get"
* },
* graphql={
* "item_query",
* "collection_query"
* },
* )
*/
#[ApiResource(
operations: [
new Get(),
new GetCollection()
],
graphQlOperations: [
new Query(),
new QueryCollection()
]
)]
class SystemConfig
{
/**
* @ApiProperty(identifier=true)
* @var string|null
*/
protected $id;
#[ApiProperty(
identifier: true,
openapiContext: [
'type' => 'string',
'description' => 'The preference id',
]
)]
protected ?string $id;
/**
* @ApiProperty
* @var string|null
*/
protected $value;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'The value',
]
)]
protected ?string $value;
/**
* @ApiProperty
* @var array
*/
protected $items = [];
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The items',
]
)]
protected array $items = [];
/**
* Get Id

View file

@ -26,38 +26,46 @@
*/
namespace App\Themes\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GraphQl\Query;
/**
* @ApiResource(
* itemOperations={
* "get"
* },
* collectionOperations={
* },
* graphql={
* "item_query",
* },
* )
*/
#[ApiResource(
operations: [
new Get()
],
graphQlOperations: [
new Query()
]
)]
class ThemeImages
{
/**
* @ApiProperty(identifier=true)
* @var string|null
*/
protected $id;
#[ApiProperty(
identifier: true,
openapiContext: [
'type' => 'string',
'description' => 'The id',
]
)]
protected ?string $id;
/**
* @ApiProperty
* @var array|null
*/
protected $items;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The items',
]
)]
protected ?array $items;
/**
* Get Id

View file

@ -28,43 +28,50 @@
namespace App\UserPreferences\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\GraphQl\Query;
use ApiPlatform\Metadata\GraphQl\QueryCollection;
/**
* @ApiResource(
* attributes={"security"="is_granted('ROLE_USER')"},
* itemOperations={
* "get"
* },
* collectionOperations={
* "get"
* },
* graphql={
* "item_query",
* "collection_query"
* },
* )
*/
#[ApiResource(
operations: [
new Get(security: "is_granted('ROLE_USER')"),
new GetCollection(security: "is_granted('ROLE_USER')")
],
security: "is_granted('ROLE_USER')",
graphQlOperations: [
new Query(security: "is_granted('ROLE_USER')"),
new QueryCollection(security: "is_granted('ROLE_USER')")
]
)]
class UserPreference
{
/**
* @ApiProperty(identifier=true)
* @var string|null
*/
protected $id;
#[ApiProperty(
identifier: true,
openapiContext: [
'type' => 'string',
'description' => 'The preference id',
]
)]
protected ?string $id;
/**
* @ApiProperty
* @var string|null
*/
protected $value;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'The preference value',
]
)]
protected ?string $value;
/**
* @ApiProperty
* @var array
*/
protected $items = [];
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The preference items',
]
)]
protected array $items = [];
/**
* Get Id

View file

@ -27,136 +27,85 @@
namespace App\ViewDefinitions\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GetCollection;
use ApiPlatform\Metadata\GraphQl\Query;
/**
* @ApiResource(
* attributes={"security"="is_granted('ROLE_USER')"},
* routePrefix="/metadata",
* itemOperations={
* "get"
* },
* collectionOperations={
* "get"
* },
* graphql={
* "item_query",
* }
* )
*/
#[ApiResource(
operations: [
new Get(security: "is_granted('ROLE_USER')"),
new GetCollection(security: "is_granted('ROLE_USER')")
],
routePrefix: '/metadata',
security: "is_granted('ROLE_USER')",
graphQlOperations: [
new Query(security: "is_granted('ROLE_USER')"),
]
)]
class ViewDefinition
{
/**
* Record View metadata
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The record-view metadata",
* },
* }
* )
*/
public $recordView;
/**
* Edit View metadata
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The edit-view metadata",
* },
* }
* )
*/
public $editView;
/**
* List View metadata
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The list-view metadata",
* },
* }
* )
*/
public $listView;
/**
* Search metadata
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The search metadata",
* },
* }
* )
*/
public $search;
/**
* Subpanel metadata
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The subpanel metadata",
* },
* }
* )
*/
public $subpanel;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The record-view metadata'
]
)]
public array $recordView;
/**
* MassUpdate metadata
*
* @var array
*
* @ApiProperty(
* attributes={
* "openapi_context"={
* "type"="array",
* "description"="The massUpdate metadata",
* },
* }
* )
*/
public $massUpdate;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The edit-view metadata'
]
)]
public array $editView;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The list-view metadata'
]
)]
public array $listView;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The search metadata'
]
)]
public array $search;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The subpanel metadata'
]
)]
public array $subpanel;
#[ApiProperty(
openapiContext: [
'type' => 'array',
'description' => 'The massUpdate metadata'
]
)]
public array $massUpdate;
/**
* The module
*
* @var string
*
* @ApiProperty(
* identifier=true,
* attributes={
* "openapi_context"={
* "type"="string",
* "description"="The module.",
* "example"="Accounts"
* }
* },
*
* )
*/
protected $id;
#[ApiProperty(
identifier: true,
openapiContext: [
'type' => 'string',
'description' => 'The module',
'example' => 'Accounts'
]
)]
protected string $id;
/**
* @return string
@ -167,16 +116,16 @@ class ViewDefinition
}
/**
* @param string $id
* @param string|null $id
*/
public function setId($id): void
public function setId(?string $id): void
{
$this->id = $id;
}
/**
* Get Record View metadata
* @return array
* @return array|null
*/
public function getRecordView(): ?array
{
@ -194,7 +143,7 @@ class ViewDefinition
/**
* Get EditView Metadata
* @return array
* @return array|null
*/
public function getEditView(): ?array
{
@ -212,7 +161,7 @@ class ViewDefinition
/**
* Get List View Metadata
* @return array
* @return array|null
*/
public function getListView(): ?array
{
@ -230,7 +179,7 @@ class ViewDefinition
/**
* Get Search Metadata
* @return array
* @return array|null
*/
public function getSearch(): ?array
{
@ -251,7 +200,7 @@ class ViewDefinition
/**
* Get Subpanel Metadata
* @return array
* @return array|null
*/
public function getSubPanel(): ?array
{
@ -272,7 +221,7 @@ class ViewDefinition
/**
* Get Mass Update definitions
* @return array
* @return array|null
*/
public function getMassUpdate(): ?array
{

View file

@ -28,8 +28,10 @@
namespace App\Module\Users\Entity;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use ApiPlatform\Metadata\ApiProperty;
use ApiPlatform\Metadata\ApiResource;
use ApiPlatform\Metadata\Get;
use ApiPlatform\Metadata\GraphQl\Query;
use DateTime;
use DateTimeInterface;
use Doctrine\ORM\Mapping as ORM;
@ -38,351 +40,554 @@ use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* @ApiResource(
* attributes={"security"="is_granted('ROLE_USER')"},
* itemOperations={
* "get"
* },
* collectionOperations={
* },
* graphql={
* "item_query",
* },
* )
* @ORM\Table(name="users", indexes={@ORM\Index(name="idx_user_name", columns={"user_name", "is_group", "status", "last_name", "first_name", "id"}, options={"lengths": {null, null, null, 30, 30}})}))
* @ORM\Entity(repositoryClass="App\Module\Users\Repository\UserRepository")
*/
#[ApiResource(
operations: [
new Get(security: "is_granted('ROLE_USER')"),
],
security: "is_granted('ROLE_USER')",
graphQlOperations: [
new Query(security: "is_granted('ROLE_USER')"),
]
)]
class User implements UserInterface, EquatableInterface, PasswordAuthenticatedUserInterface
{
/**
* @var string
*
*
* @ApiProperty(identifier=true)
* @ORM\Column(name="id", type="string", length=36, nullable=false, options={"fixed"=true, "collation":"utf8_general_ci"})
* @ORM\Id
*/
private $id;
#[ApiProperty(
identifier: true,
openapiContext: [
'type' => 'string',
'description' => 'The user id',
]
)]
private string $id;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="user_name", type="string", length=60, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $user_name;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'The username',
]
)]
private ?string $user_name;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="user_hash", type="string", length=255, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $userHash;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'The user hash',
]
)]
private ?string $userHash;
/**
* @var bool|null
*
* @ApiProperty
* @ORM\Column(name="system_generated_password", type="boolean", nullable=true)
*/
private $systemGeneratedPassword;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'The system generated password hash',
]
)]
private ?bool $systemGeneratedPassword;
/**
* @var DateTime|null
*
* @ApiProperty
* @ORM\Column(name="pwd_last_changed", type="datetime", nullable=true)
*/
private $pwdLastChanged;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'The date when password last changed',
]
)]
private ?DateTime $pwdLastChanged;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="authenticate_id", type="string", length=100, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $authenticateId;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'The authenticate id',
]
)]
private ?string $authenticateId;
/**
* @var bool|null
*
* @ApiProperty
* @ORM\Column(name="sugar_login", type="boolean", nullable=true, options={"default"="1"})
*/
private $sugarLogin = true;
#[ApiProperty(
openapiContext: [
'type' => 'boolean',
'description' => 'sugar login',
]
)]
private ?bool $sugarLogin = true;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="first_name", type="string", length=255, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $firstName;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'The first name',
]
)]
private ?string $firstName;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="last_name", type="string", length=255, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $lastName;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'The last name',
]
)]
private ?string $lastName;
/**
* @var bool|null
*
* @ApiProperty
* @ORM\Column(name="is_admin", type="boolean", nullable=true, options={"default"="0"})
*/
private $isAdmin = '0';
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'Is admin',
]
)]
private string|bool|null $isAdmin = '0';
/**
* @var bool|null
*
* @ApiProperty
* @ORM\Column(name="external_auth_only", type="boolean", nullable=true, options={"default"="0"})
*/
private $externalAuthOnly = '0';
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'external auth only',
]
)]
private string|bool|null $externalAuthOnly = '0';
/**
* @var bool|null
*
* @ApiProperty
* @ORM\Column(name="receive_notifications", type="boolean", nullable=true, options={"default"="1"})
*/
private $receiveNotifications = true;
#[ApiProperty(
openapiContext: [
'type' => 'boolean',
'description' => 'receive notifications',
]
)]
private ?bool $receiveNotifications = true;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="description", type="text", length=65535, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $description;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'description',
]
)]
private ?string $description;
/**
* @var DateTime|null
*
* @ApiProperty
* @ORM\Column(name="date_entered", type="datetime", nullable=true)
*/
private $dateEntered;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'date entered',
]
)]
private ?DateTime $dateEntered;
/**
* @var DateTime|null
*
* @ApiProperty
* @ORM\Column(name="date_modified", type="datetime", nullable=true)
*/
private $dateModified;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'date modified',
]
)]
private ?DateTime $dateModified;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="modified_user_id", type="string", length=36, nullable=true, options={"fixed"=true, "collation":"utf8_general_ci"})
*/
private $modifiedUserId;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'modified by user id',
]
)]
private ?string $modifiedUserId;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="created_by", type="string", length=36, nullable=true, options={"fixed"=true, "collation":"utf8_general_ci"})
*/
private $createdBy;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'created by user id',
]
)]
private ?string $createdBy;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="title", type="string", length=50, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $title;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'title',
]
)]
private ?string $title;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="photo", type="string", length=255, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $photo;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'photo',
]
)]
private ?string $photo;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="department", type="string", length=50, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $department;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'department',
]
)]
private ?string $department;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="phone_home", type="string", length=50, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $phoneHome;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'home phone',
]
)]
private ?string $phoneHome;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="phone_mobile", type="string", length=50, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $phoneMobile;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'mobile phone',
]
)]
private ?string $phoneMobile;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="phone_work", type="string", length=50, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $phoneWork;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'work phone',
]
)]
private ?string $phoneWork;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="phone_other", type="string", length=50, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $phoneOther;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'other phone',
]
)]
private ?string $phoneOther;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="phone_fax", type="string", length=50, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $phoneFax;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'fax phone',
]
)]
private ?string $phoneFax;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="status", type="string", length=100, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $status;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'status',
]
)]
private ?string $status;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="address_street", type="string", length=150, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $addressStreet;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'address street',
]
)]
private ?string $addressStreet;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="address_city", type="string", length=100, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $addressCity;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'address city',
]
)]
private ?string $addressCity;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="address_state", type="string", length=100, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $addressState;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'address state',
]
)]
private ?string $addressState;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="address_country", type="string", length=100, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $addressCountry;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'address country',
]
)]
private ?string $addressCountry;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="address_postalcode", type="string", length=20, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $addressPostalcode;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'address postal code',
]
)]
private ?string $addressPostalcode;
/**
* @var bool|null
*
* @ApiProperty
* @ORM\Column(name="deleted", type="boolean", nullable=true)
*/
private $deleted;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'deleted',
]
)]
private ?bool $deleted;
/**
* @var bool|null
*
* @ApiProperty
* @ORM\Column(name="portal_only", type="boolean", nullable=true, options={"default"="0"})
*/
private $portalOnly = '0';
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'portal only',
]
)]
private string|bool|null $portalOnly = '0';
/**
* @var bool|null
*
* @ApiProperty
* @ORM\Column(name="show_on_employees", type="boolean", nullable=true, options={"default"="1"})
*/
private $showOnEmployees = true;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'show on employees',
]
)]
private ?bool $showOnEmployees = true;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="employee_status", type="string", length=100, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $employeeStatus;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'employee status',
]
)]
private ?string $employeeStatus;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="messenger_id", type="string", length=100, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $messengerId;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'messenger id',
]
)]
private ?string $messengerId;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="messenger_type", type="string", length=100, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $messengerType;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'messenger type',
]
)]
private ?string $messengerType;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="reports_to_id", type="string", length=36, nullable=true, options={"fixed"=true, "collation":"utf8_general_ci"})
*/
private $reportsToId;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'reports to id',
]
)]
private ?string $reportsToId;
/**
* @var bool|null
*
* @ApiProperty
* @ORM\Column(name="is_group", type="boolean", nullable=true)
*/
private $isGroup;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'is group',
]
)]
private ?bool $isGroup;
/**
* @var bool|null
*
* @ApiProperty
* @ORM\Column(name="factor_auth", type="boolean", nullable=true)
*/
private $factorAuth;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'factor auth',
]
)]
private ?bool $factorAuth;
/**
* @var string|null
*
* @ApiProperty
* @ORM\Column(name="factor_auth_interface", type="string", length=255, nullable=true, options={"collation":"utf8_general_ci"})
*/
private $factorAuthInterface;
#[ApiProperty(
openapiContext: [
'type' => 'string',
'description' => 'factor auth interface',
]
)]
private ?string $factorAuthInterface;
/**
* @see UserInterface
@ -395,7 +600,7 @@ class User implements UserInterface, EquatableInterface, PasswordAuthenticatedUs
}
/**
* @return string|int
* @return string|null
*/
public function getId(): ?string
{