mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-11-12 04:03:44 +08:00
修复模版生成model.ts默认值不带引号
This commit is contained in:
@@ -2,9 +2,16 @@
|
||||
|
||||
@{.const}
|
||||
|
||||
export class State {@{range .stateItems}
|
||||
public @{.Name} = @{.DefaultValue}; // @{.Dc}@{end}
|
||||
|
||||
export class State {
|
||||
@{range .stateItems}
|
||||
public @{.Name} = @{if and .DataType (or
|
||||
(eq .DataType "varchar")
|
||||
(eq .DataType "char")
|
||||
(eq .DataType "text")
|
||||
(eq .DataType "json")
|
||||
(eq .DataType "date")
|
||||
(eq .DataType "datetime")
|
||||
)}'@{.DefaultValue}'@{else}@{.DefaultValue}@{end};//@{.Dc}@{end}
|
||||
constructor(state?: Partial<State>) {
|
||||
if (state) {
|
||||
Object.assign(this, state);
|
||||
|
||||
Reference in New Issue
Block a user