Skip to content

Commit

Permalink
修复自动生成模型时 DECIMAL 类型,设置小数不起作用的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
arterli committed Mar 10, 2023
1 parent eef7f1a commit 06627c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/service/sys/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class GenerateService extends Service {
if (v.autoIncrement) {
autoIncrement = `, autoIncrement:${v.autoIncrement}`;
}
} else if (v.type === 'FLOAT' || v.type === 'DOUBLE' || v.type === 'DOUBLE') {
} else if (v.type === 'FLOAT' || v.type === 'DOUBLE' || v.type === 'DECIMAL') {
const tt = `type: DataTypes.${v.type}`;
if (v.unsigned && v.zerofill) {
type = `${tt}.UNSIGNED.ZEROFILL`;
Expand Down

0 comments on commit 06627c6

Please sign in to comment.