mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
代码规范
This commit is contained in:
@@ -1042,19 +1042,20 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
$data = [];
|
||||
}
|
||||
|
||||
// 数据自动验证
|
||||
if (!$this->validateData($data)) {
|
||||
return false;
|
||||
}
|
||||
// 数据对象赋值
|
||||
foreach ($data as $key => $value) {
|
||||
$this->setAttr($key, $value, $data);
|
||||
}
|
||||
if (!empty($where)) {
|
||||
$this->isUpdate = true;
|
||||
$this->updateWhere = $where;
|
||||
}
|
||||
// 数据自动验证
|
||||
if (!$this->validateData($data)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 数据对象赋值
|
||||
foreach ($data as $key => $value) {
|
||||
$this->setAttr($key, $value, $data);
|
||||
}
|
||||
|
||||
if (!empty($where)) {
|
||||
$this->isUpdate = true;
|
||||
$this->updateWhere = $where;
|
||||
}
|
||||
|
||||
// 自动关联写入
|
||||
if (!empty($this->relationWrite)) {
|
||||
|
||||
Reference in New Issue
Block a user