Skip to content

Commit

Permalink
重新生成 pgsql 模型基类
Browse files Browse the repository at this point in the history
  • Loading branch information
Yurunsoft committed Jan 24, 2024
1 parent 35dbd13 commit e57c075
Show file tree
Hide file tree
Showing 5 changed files with 130 additions and 130 deletions.
52 changes: 26 additions & 26 deletions server/Module/Embedding/Model/Base/EmbeddingFileBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ public function getId(): ?int
*
* @return static
*/
public function setId(?int $id)
public function setId($id)
{
$this->id = $id;
$this->id = null === $id ? null : (int) $id;

return $this;
}
Expand Down Expand Up @@ -95,9 +95,9 @@ public function getProjectId(): ?int
*
* @return static
*/
public function setProjectId(?int $projectId)
public function setProjectId($projectId)
{
$this->projectId = $projectId;
$this->projectId = null === $projectId ? null : (int) $projectId;

return $this;
}
Expand Down Expand Up @@ -125,9 +125,9 @@ public function getStatus(): ?int
*
* @return static
*/
public function setStatus(?int $status)
public function setStatus($status)
{
$this->status = $status;
$this->status = null === $status ? null : (int) $status;

return $this;
}
Expand Down Expand Up @@ -155,13 +155,13 @@ public function getFileName(): ?string
*
* @return static
*/
public function setFileName(?string $fileName)
public function setFileName($fileName)
{
if (\is_string($fileName) && mb_strlen($fileName) > 255)
{
throw new \InvalidArgumentException('The maximum length of $fileName is 255');
}
$this->fileName = $fileName;
$this->fileName = null === $fileName ? null : $fileName;

return $this;
}
Expand Down Expand Up @@ -189,9 +189,9 @@ public function getFileSize(): ?int
*
* @return static
*/
public function setFileSize(?int $fileSize)
public function setFileSize($fileSize)
{
$this->fileSize = $fileSize;
$this->fileSize = null === $fileSize ? null : (int) $fileSize;

return $this;
}
Expand Down Expand Up @@ -219,9 +219,9 @@ public function getContent(): ?string
*
* @return static
*/
public function setContent(?string $content)
public function setContent($content)
{
$this->content = $content;
$this->content = null === $content ? null : $content;

return $this;
}
Expand Down Expand Up @@ -249,9 +249,9 @@ public function getCreateTime(): ?int
*
* @return static
*/
public function setCreateTime(?int $createTime)
public function setCreateTime($createTime)
{
$this->createTime = $createTime;
$this->createTime = null === $createTime ? null : (int) $createTime;

return $this;
}
Expand Down Expand Up @@ -279,9 +279,9 @@ public function getUpdateTime(): ?int
*
* @return static
*/
public function setUpdateTime(?int $updateTime)
public function setUpdateTime($updateTime)
{
$this->updateTime = $updateTime;
$this->updateTime = null === $updateTime ? null : (int) $updateTime;

return $this;
}
Expand Down Expand Up @@ -309,9 +309,9 @@ public function getBeginTrainingTime(): ?int
*
* @return static
*/
public function setBeginTrainingTime(?int $beginTrainingTime)
public function setBeginTrainingTime($beginTrainingTime)
{
$this->beginTrainingTime = $beginTrainingTime;
$this->beginTrainingTime = null === $beginTrainingTime ? null : (int) $beginTrainingTime;

return $this;
}
Expand Down Expand Up @@ -339,9 +339,9 @@ public function getCompleteTrainingTime(): ?int
*
* @return static
*/
public function setCompleteTrainingTime(?int $completeTrainingTime)
public function setCompleteTrainingTime($completeTrainingTime)
{
$this->completeTrainingTime = $completeTrainingTime;
$this->completeTrainingTime = null === $completeTrainingTime ? null : (int) $completeTrainingTime;

return $this;
}
Expand Down Expand Up @@ -369,9 +369,9 @@ public function getTokens(): ?int
*
* @return static
*/
public function setTokens(?int $tokens)
public function setTokens($tokens)
{
$this->tokens = $tokens;
$this->tokens = null === $tokens ? null : (int) $tokens;

return $this;
}
Expand Down Expand Up @@ -399,9 +399,9 @@ public function getPayTokens(): ?int
*
* @return static
*/
public function setPayTokens(?int $payTokens)
public function setPayTokens($payTokens)
{
$this->payTokens = $payTokens;
$this->payTokens = null === $payTokens ? null : (int) $payTokens;

return $this;
}
Expand Down Expand Up @@ -429,9 +429,9 @@ public function getIp(): ?string
*
* @return static
*/
public function setIp(?string $ip)
public function setIp($ip)
{
$this->ip = $ip;
$this->ip = null === $ip ? null : $ip;

return $this;
}
Expand Down
70 changes: 35 additions & 35 deletions server/Module/Embedding/Model/Base/EmbeddingProjectBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public function getId(): ?int
*
* @return static
*/
public function setId(?int $id)
public function setId($id)
{
$this->id = $id;
$this->id = null === $id ? null : (int) $id;

return $this;
}
Expand Down Expand Up @@ -100,9 +100,9 @@ public function getMemberId(): ?int
*
* @return static
*/
public function setMemberId(?int $memberId)
public function setMemberId($memberId)
{
$this->memberId = $memberId;
$this->memberId = null === $memberId ? null : (int) $memberId;

return $this;
}
Expand Down Expand Up @@ -130,13 +130,13 @@ public function getName(): ?string
*
* @return static
*/
public function setName(?string $name)
public function setName($name)
{
if (\is_string($name) && mb_strlen($name) > 32)
{
throw new \InvalidArgumentException('The maximum length of $name is 32');
}
$this->name = $name;
$this->name = null === $name ? null : $name;

return $this;
}
Expand Down Expand Up @@ -164,9 +164,9 @@ public function getTotalFileSize(): ?int
*
* @return static
*/
public function setTotalFileSize(?int $totalFileSize)
public function setTotalFileSize($totalFileSize)
{
$this->totalFileSize = $totalFileSize;
$this->totalFileSize = null === $totalFileSize ? null : (int) $totalFileSize;

return $this;
}
Expand Down Expand Up @@ -194,9 +194,9 @@ public function getCreateTime(): ?int
*
* @return static
*/
public function setCreateTime(?int $createTime)
public function setCreateTime($createTime)
{
$this->createTime = $createTime;
$this->createTime = null === $createTime ? null : (int) $createTime;

return $this;
}
Expand Down Expand Up @@ -224,9 +224,9 @@ public function getUpdateTime(): ?int
*
* @return static
*/
public function setUpdateTime(?int $updateTime)
public function setUpdateTime($updateTime)
{
$this->updateTime = $updateTime;
$this->updateTime = null === $updateTime ? null : (int) $updateTime;

return $this;
}
Expand Down Expand Up @@ -254,9 +254,9 @@ public function getStatus(): ?int
*
* @return static
*/
public function setStatus(?int $status)
public function setStatus($status)
{
$this->status = $status;
$this->status = null === $status ? null : (int) $status;

return $this;
}
Expand Down Expand Up @@ -284,9 +284,9 @@ public function getTokens(): ?int
*
* @return static
*/
public function setTokens(?int $tokens)
public function setTokens($tokens)
{
$this->tokens = $tokens;
$this->tokens = null === $tokens ? null : (int) $tokens;

return $this;
}
Expand Down Expand Up @@ -314,9 +314,9 @@ public function getPayTokens(): ?int
*
* @return static
*/
public function setPayTokens(?int $payTokens)
public function setPayTokens($payTokens)
{
$this->payTokens = $payTokens;
$this->payTokens = null === $payTokens ? null : (int) $payTokens;

return $this;
}
Expand Down Expand Up @@ -344,9 +344,9 @@ public function getIp(): ?string
*
* @return static
*/
public function setIp(?string $ip)
public function setIp($ip)
{
$this->ip = $ip;
$this->ip = null === $ip ? null : $ip;

return $this;
}
Expand Down Expand Up @@ -374,9 +374,9 @@ public function getPublic(): ?bool
*
* @return static
*/
public function setPublic(?bool $public)
public function setPublic($public)
{
$this->public = $public;
$this->public = null === $public ? null : (bool) $public;

return $this;
}
Expand Down Expand Up @@ -404,13 +404,13 @@ public function getSectionSeparator(): ?string
*
* @return static
*/
public function setSectionSeparator(?string $sectionSeparator)
public function setSectionSeparator($sectionSeparator)
{
if (\is_string($sectionSeparator) && mb_strlen($sectionSeparator) > 16)
{
throw new \InvalidArgumentException('The maximum length of $sectionSeparator is 16');
}
$this->sectionSeparator = $sectionSeparator;
$this->sectionSeparator = null === $sectionSeparator ? null : $sectionSeparator;

return $this;
}
Expand Down Expand Up @@ -438,9 +438,9 @@ public function getSectionSplitLength(): ?int
*
* @return static
*/
public function setSectionSplitLength(?int $sectionSplitLength)
public function setSectionSplitLength($sectionSplitLength)
{
$this->sectionSplitLength = $sectionSplitLength;
$this->sectionSplitLength = null === $sectionSplitLength ? null : (int) $sectionSplitLength;

return $this;
}
Expand Down Expand Up @@ -468,9 +468,9 @@ public function getSectionSplitByTitle(): ?bool
*
* @return static
*/
public function setSectionSplitByTitle(?bool $sectionSplitByTitle)
public function setSectionSplitByTitle($sectionSplitByTitle)
{
$this->sectionSplitByTitle = $sectionSplitByTitle;
$this->sectionSplitByTitle = null === $sectionSplitByTitle ? null : (bool) $sectionSplitByTitle;

return $this;
}
Expand Down Expand Up @@ -504,7 +504,7 @@ public function &getChatConfig()
*/
public function setChatConfig($chatConfig)
{
$this->chatConfig = $chatConfig;
$this->chatConfig = null === $chatConfig ? null : $chatConfig;

return $this;
}
Expand Down Expand Up @@ -532,9 +532,9 @@ public function getSimilarity(): ?float
*
* @return static
*/
public function setSimilarity(?float $similarity)
public function setSimilarity($similarity)
{
$this->similarity = $similarity;
$this->similarity = null === $similarity ? null : (float) $similarity;

return $this;
}
Expand Down Expand Up @@ -562,9 +562,9 @@ public function getTopSections(): ?int
*
* @return static
*/
public function setTopSections(?int $topSections)
public function setTopSections($topSections)
{
$this->topSections = $topSections;
$this->topSections = null === $topSections ? null : (int) $topSections;

return $this;
}
Expand Down Expand Up @@ -592,9 +592,9 @@ public function getPrompt(): ?string
*
* @return static
*/
public function setPrompt(?string $prompt)
public function setPrompt($prompt)
{
$this->prompt = $prompt;
$this->prompt = null === $prompt ? null : $prompt;

return $this;
}
Expand Down
Loading

0 comments on commit e57c075

Please sign in to comment.