import 'package:json_annotation/json_annotation.dart'; part 'keyboard_guide_msg.g.dart'; /// 引导消息实体类 @JsonSerializable() class KeyboardGuideMsg { /// 是否是我发的 @JsonKey(name: 'isMe') bool isMe; /// 消息内容 @JsonKey(name: 'content') String content; /// 类型 @JsonKey(name: "type") String type; /// 创建时间 @JsonKey(name: 'createTime') int createTime; KeyboardGuideMsg(this.isMe, this.content, this.type, this.createTime); factory KeyboardGuideMsg.fromJson(Map json) => _$KeyboardGuideMsgFromJson(json); Map toJson() => _$KeyboardGuideMsgToJson(this); }