/** * Created by Macheng on 2019/02/22. */ class BaseModel { isCreate = false extProp1 = '' extProp2 = '' extProp3 = '' extProp4 = '' extProp5 = '' init(opts) { if (!opts) opts = {} this.isCreate = opts['isCreate'] || false this.extProp1 = opts['extProp1'] || '' this.extProp2 = opts['extProp2'] || '' this.extProp3 = opts['extProp3'] || '' this.extProp4 = opts['extProp4'] || '' this.extProp5 = opts['extProp5'] || '' } toJson() { return { isCreate: this.isCreate, extProp1: this.extProp1, extProp2: this.extProp2, extProp3: this.extProp3, extProp4: this.extProp4, extProp5: this.extProp5 } } } export default BaseModel