Skip to content

Commit

Permalink
Update code generation
Browse files Browse the repository at this point in the history
  • Loading branch information
SDKgen-Bot committed Jun 8, 2024
1 parent 5e77ea7 commit aebd863
Show file tree
Hide file tree
Showing 7 changed files with 278 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sdkgen.lock

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions src/Backend/DatabaseConnections.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

declare(strict_types = 1);

namespace Fusio\Model\Backend;


class DatabaseConnections implements \JsonSerializable, \PSX\Record\RecordableInterface
{
/**
* @var array<string>|null
*/
protected ?array $connections = null;
/**
* @param array<string>|null $connections
*/
public function setConnections(?array $connections) : void
{
$this->connections = $connections;
}
/**
* @return array<string>|null
*/
public function getConnections() : ?array
{
return $this->connections;
}
public function toRecord() : \PSX\Record\RecordInterface
{
/** @var \PSX\Record\Record<mixed> $record */
$record = new \PSX\Record\Record();
$record->put('connections', $this->connections);
return $record;
}
public function jsonSerialize() : object
{
return (object) $this->toRecord()->getAll();
}
}

13 changes: 13 additions & 0 deletions src/Backend/DatabaseRow.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types = 1);

namespace Fusio\Model\Backend;

/**
* @extends \PSX\Record\Record<mixed>
*/
class DatabaseRow extends \PSX\Record\Record
{
}

13 changes: 13 additions & 0 deletions src/Backend/DatabaseRows.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

declare(strict_types = 1);

namespace Fusio\Model\Backend;

/**
* @extends \Fusio\Model\Common\Collection<DatabaseRow>
*/
class DatabaseRows extends \Fusio\Model\Common\Collection
{
}

50 changes: 50 additions & 0 deletions src/Backend/DatabaseTable.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

declare(strict_types = 1);

namespace Fusio\Model\Backend;


class DatabaseTable implements \JsonSerializable, \PSX\Record\RecordableInterface
{
protected ?string $name = null;
/**
* @var array<DatabaseTableColumn>|null
*/
protected ?array $columns = null;
public function setName(?string $name) : void
{
$this->name = $name;
}
public function getName() : ?string
{
return $this->name;
}
/**
* @param array<DatabaseTableColumn>|null $columns
*/
public function setColumns(?array $columns) : void
{
$this->columns = $columns;
}
/**
* @return array<DatabaseTableColumn>|null
*/
public function getColumns() : ?array
{
return $this->columns;
}
public function toRecord() : \PSX\Record\RecordInterface
{
/** @var \PSX\Record\Record<mixed> $record */
$record = new \PSX\Record\Record();
$record->put('name', $this->name);
$record->put('columns', $this->columns);
return $record;
}
public function jsonSerialize() : object
{
return (object) $this->toRecord()->getAll();
}
}

121 changes: 121 additions & 0 deletions src/Backend/DatabaseTableColumn.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
<?php

declare(strict_types = 1);

namespace Fusio\Model\Backend;


class DatabaseTableColumn implements \JsonSerializable, \PSX\Record\RecordableInterface
{
protected ?string $name = null;
protected ?string $type = null;
protected ?int $length = null;
protected ?int $precision = null;
protected ?int $scale = null;
protected ?bool $unsigned = null;
protected ?bool $fixed = null;
protected ?bool $notNull = null;
protected mixed $default = null;
protected ?string $comment = null;
public function setName(?string $name) : void
{
$this->name = $name;
}
public function getName() : ?string
{
return $this->name;
}
public function setType(?string $type) : void
{
$this->type = $type;
}
public function getType() : ?string
{
return $this->type;
}
public function setLength(?int $length) : void
{
$this->length = $length;
}
public function getLength() : ?int
{
return $this->length;
}
public function setPrecision(?int $precision) : void
{
$this->precision = $precision;
}
public function getPrecision() : ?int
{
return $this->precision;
}
public function setScale(?int $scale) : void
{
$this->scale = $scale;
}
public function getScale() : ?int
{
return $this->scale;
}
public function setUnsigned(?bool $unsigned) : void
{
$this->unsigned = $unsigned;
}
public function getUnsigned() : ?bool
{
return $this->unsigned;
}
public function setFixed(?bool $fixed) : void
{
$this->fixed = $fixed;
}
public function getFixed() : ?bool
{
return $this->fixed;
}
public function setNotNull(?bool $notNull) : void
{
$this->notNull = $notNull;
}
public function getNotNull() : ?bool
{
return $this->notNull;
}
public function setDefault(mixed $default) : void
{
$this->default = $default;
}
public function getDefault() : mixed
{
return $this->default;
}
public function setComment(?string $comment) : void
{
$this->comment = $comment;
}
public function getComment() : ?string
{
return $this->comment;
}
public function toRecord() : \PSX\Record\RecordInterface
{
/** @var \PSX\Record\Record<mixed> $record */
$record = new \PSX\Record\Record();
$record->put('name', $this->name);
$record->put('type', $this->type);
$record->put('length', $this->length);
$record->put('precision', $this->precision);
$record->put('scale', $this->scale);
$record->put('unsigned', $this->unsigned);
$record->put('fixed', $this->fixed);
$record->put('notNull', $this->notNull);
$record->put('default', $this->default);
$record->put('comment', $this->comment);
return $record;
}
public function jsonSerialize() : object
{
return (object) $this->toRecord()->getAll();
}
}

40 changes: 40 additions & 0 deletions src/Backend/DatabaseTables.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

declare(strict_types = 1);

namespace Fusio\Model\Backend;


class DatabaseTables implements \JsonSerializable, \PSX\Record\RecordableInterface
{
/**
* @var array<string>|null
*/
protected ?array $tables = null;
/**
* @param array<string>|null $tables
*/
public function setTables(?array $tables) : void
{
$this->tables = $tables;
}
/**
* @return array<string>|null
*/
public function getTables() : ?array
{
return $this->tables;
}
public function toRecord() : \PSX\Record\RecordInterface
{
/** @var \PSX\Record\Record<mixed> $record */
$record = new \PSX\Record\Record();
$record->put('tables', $this->tables);
return $record;
}
public function jsonSerialize() : object
{
return (object) $this->toRecord()->getAll();
}
}

0 comments on commit aebd863

Please sign in to comment.