支持了对money类型

This commit is contained in:
Xu Chang 2023-03-03 10:27:41 +08:00
parent d3e98c59ba
commit 0672a6413e
2 changed files with 6 additions and 0 deletions

View File

@ -136,6 +136,9 @@ var MySqlTranslator = /** @class */ (function (_super) {
if (type === 'ref') {
return 'char(36)';
}
if (type === 'money') {
return 'bigint';
}
if (type === 'enum') {
(0, assert_1.default)(enumeration);
return "enum(".concat(enumeration.map(function (ele) { return "'".concat(ele, "'"); }).join(','), ")");

View File

@ -309,6 +309,9 @@ export class MySqlTranslator<ED extends EntityDict> extends SqlTranslator<ED> {
if (type === 'ref') {
return 'char(36)';
}
if (type === 'money') {
return 'bigint';
}
if (type === 'enum') {
assert(enumeration);
return `enum(${enumeration.map(ele => `'${ele}'`).join(',')})`;