| 1234567891011121314151617181920212223242526272829303132333435363738 |
- /**
- * 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
|