Merge pull request #383 from AtrisMio/patch-1

兼容Null类型数据
pull/503/head
Bosn 6 years ago committed by GitHub
commit b8a01a1d46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
ALTER TABLE `Properties`
MODIFY COLUMN `type` enum('String','Number','Boolean','Object','Array','Function','RegExp','Null') NOT NULL;

@ -2,7 +2,7 @@ import { Table, Column, Model, AutoIncrement, PrimaryKey, AllowNull, DataType, D
import { User, Interface, Module, Repository } from '../'
export enum SCOPES { REQUEST = 'request', RESPONSE = 'response' }
export enum TYPES { STRING = 'String', NUMBER = 'Number', BOOLEAN = 'Boolean', OBJECT = 'Object', ARRAY = 'Array', FUNCTION = 'Function', REGEXP = 'RegExp' }
export enum TYPES { STRING = 'String', NUMBER = 'Number', BOOLEAN = 'Boolean', OBJECT = 'Object', ARRAY = 'Array', FUNCTION = 'Function', REGEXP = 'RegExp', Null = 'Null' }
export enum REQUEST_PARAMS_TYPE {
HEADERS = 1,
@ -100,4 +100,4 @@ export default class Property extends Model<Property> {
/** 是否为必填选项 */
required: boolean
}
}

@ -2,7 +2,7 @@ import { mock } from 'mockjs'
const scopes = ['request', 'response']
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']
let USER_ID = 100000000
@ -102,4 +102,4 @@ export const BO_PROPERTY_FN = (source: any) => {
}),
source,
)
}
}

Loading…
Cancel
Save