mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-08 02:52:49 +08:00
feat: 发布智能体版
This commit is contained in:
@@ -19,5 +19,14 @@ class Field
|
||||
public bool $autoIncrement = false,
|
||||
public bool $primary = false
|
||||
) {
|
||||
$type = strtolower(trim($this->type));
|
||||
|
||||
if ($this->length !== null && $this->length < 1) {
|
||||
throw new \InvalidArgumentException("Scheme 字段 length 必须 >= 1,当前={$this->length}");
|
||||
}
|
||||
|
||||
if ($type === 'char' && $this->length !== null && $this->length > 255) {
|
||||
throw new \InvalidArgumentException("Scheme 字段类型 char 的 length 超出范围,允许 1-255,当前={$this->length}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user