Skip to content

Commit

Permalink
增加schema方法
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st committed Nov 21, 2024
1 parent c99f00b commit 5dfaf30
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/model/concern/Attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,19 @@ public function getPk()
return $this->pk;
}

/**
* 设置模型的字段信息.
*
* @param array $schema
* @return $this
*/
public function schema(array $schema)
{
$this->schema = $schema;
return $this;
}


public function isJsonAssoc(): bool
{
return $this->jsonAssoc;
Expand Down

0 comments on commit 5dfaf30

Please sign in to comment.