Commit 83fe4c2a authored by 王源's avatar 王源 🎧

修改自动生成模型bug

parent ec4d017d
......@@ -358,6 +358,8 @@ class MakeModelCommand extends HyperfCommand
if (isset($this->cc[$v['data_type']]) && $this->cc[$v['data_type']] != 'string') {
if ($this->cc[$v['data_type']] == 'timestamp') {
$casts .= "\t\t'" . $name . "'=>'datetime',\n";
} else if ($this->cc[$v['data_type']] == 'decimal') {
$casts .= "\t\t'" . $name . "'=>'float',\n";
} else {
$casts .= "\t\t'" . $name . "'=>'" . $this->cc[$v['data_type']] . "',\n";
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment