protected function defineFields(): FieldCollection
{ return new FieldCollection([ (new IdField('id', 'id'
))->
addFlags(new PrimaryKey(),
new Required()),
new BoolField('create_thumbnails', 'createThumbnails'
),
new BoolField('keep_aspect_ratio', 'keepAspectRatio'
),
new IntField('thumbnail_quality', 'thumbnailQuality', 0, 100
),
new BoolField('private', 'private'
),
new BoolField('no_association', 'noAssociation'
),
new OneToManyAssociationField('mediaFolders', MediaFolderDefinition::
class, 'media_folder_configuration_id', 'id'
),
new ManyToManyAssociationField('mediaThumbnailSizes', MediaThumbnailSizeDefinition::
class, MediaFolderConfigurationMediaThumbnailSizeDefinition::
class, 'media_folder_configuration_id', 'media_thumbnail_size_id'
),
(new BlobField('media_thumbnail_sizes_ro', 'mediaThumbnailSizesRo'
))->
removeFlag(ApiAware::
class)->
addFlags(new Computed()),
new CustomFields(),
]);
}}