1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- import 'dart:convert' show json;
- T asT<T>(dynamic value) {
- if (value is T) {
- return value;
- }
- return null;
- }
- class UserXieyi {
- UserXieyi({
- this.id,
- this.createTime,
- this.createBy,
- this.updateTime,
- this.updateBy,
- this.name,
- this.createUserId,
- this.url,
- this.fileName,
- this.template,
- this.statuz,
- this.type,
- this.nickname,
- this.headUrl,
- });
- factory UserXieyi.fromJson(Map<String, dynamic> jsonRes) => jsonRes == null
- ? null
- : UserXieyi(
- id: asT<int>(jsonRes['id']),
- createTime: asT<int>(jsonRes['createTime']),
- createBy: asT<Object>(jsonRes['createBy']),
- updateTime: asT<int>(jsonRes['updateTime']),
- updateBy: asT<Object>(jsonRes['updateBy']),
- name: asT<String>(jsonRes['name']),
- createUserId: asT<String>(jsonRes['createUserId']),
- url: asT<String>(jsonRes['url']),
- fileName: asT<String>(jsonRes['fileName']),
- template: asT<Object>(jsonRes['template']),
- statuz: asT<int>(jsonRes['statuz']),
- type: asT<int>(jsonRes['type']),
- nickname: asT<String>(jsonRes['nickname']),
- headUrl: asT<String>(jsonRes['headUrl']),
- );
- int id;
- int createTime;
- Object createBy;
- int updateTime;
- Object updateBy;
- String name;
- String createUserId;
- String url;
- String fileName;
- Object template;
- int statuz;
- int type;
- String nickname;
- String headUrl;
- Map<String, dynamic> toJson() => <String, dynamic>{
- 'id': id,
- 'createTime': createTime,
- 'createBy': createBy,
- 'updateTime': updateTime,
- 'updateBy': updateBy,
- 'name': name,
- 'createUserId': createUserId,
- 'url': url,
- 'fileName': fileName,
- 'template': template,
- 'statuz': statuz,
- 'type': type,
- 'nickname': nickname,
- 'headUrl': headUrl,
- };
- @override
- String toString() {
- return json.encode(this);
- }
- }
|