fix: null type

pull/635/head
bigfengyu 5 years ago
parent ffcf2bd624
commit cd5313b6dd

@ -33,7 +33,7 @@ export default class Property extends Model<Property> {
@AllowNull(false) @AllowNull(false)
@Column({ @Column({
type: DataType.ENUM(TYPES.STRING, TYPES.NUMBER, TYPES.BOOLEAN, TYPES.OBJECT, TYPES.ARRAY, TYPES.FUNCTION, TYPES.REGEXP), type: DataType.ENUM(TYPES.STRING, TYPES.NUMBER, TYPES.BOOLEAN, TYPES.OBJECT, TYPES.ARRAY, TYPES.FUNCTION, TYPES.REGEXP, TYPES.Null),
comment: 'property type', comment: 'property type',
}) })
/** Data Type */ /** Data Type */

@ -108,6 +108,10 @@ export default class Tree {
}) })
} }
break break
case 'Null':
// tslint:disable-next-line: no-null-keyword
result[item.name + rule] = null
break
} }
} }
} }

@ -2,7 +2,7 @@ import { mock } from 'mockjs'
const scopes = ['request', 'response'] const scopes = ['request', 'response']
const methods = ['GET', 'POST', 'PUT', 'DELETE'] const methods = ['GET', 'POST', 'PUT', 'DELETE']
const types = ['String', 'Number', 'Boolean', 'Object', 'Array', 'Function', 'RegExp'] const types = ['String', 'Number', 'Boolean', 'Object', 'Array', 'Function', 'RegExp', 'Null']
const values = ['@INT', '@FLOAT', '@TITLE', '@NAME'] const values = ['@INT', '@FLOAT', '@TITLE', '@NAME']
let USER_ID = 100000000 let USER_ID = 100000000

Loading…
Cancel
Save