import 'dart:convert' show json; T asT(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 jsonRes) => jsonRes == null ? null : UserXieyi( id: asT(jsonRes['id']), createTime: asT(jsonRes['createTime']), createBy: asT(jsonRes['createBy']), updateTime: asT(jsonRes['updateTime']), updateBy: asT(jsonRes['updateBy']), name: asT(jsonRes['name']), createUserId: asT(jsonRes['createUserId']), url: asT(jsonRes['url']), fileName: asT(jsonRes['fileName']), template: asT(jsonRes['template']), statuz: asT(jsonRes['statuz']), type: asT(jsonRes['type']), nickname: asT(jsonRes['nickname']), headUrl: asT(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 toJson() => { '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); } }