ChatApp/lib/beans/MessageBean.dart
2024-07-05 10:00:00 +08:00

19 lines
406 B
Dart

import 'package:json_annotation/json_annotation.dart';
part 'MessageBean.g.dart';
@JsonSerializable(explicitToJson: true)
class MessageBean{
String? role;
String? content;
String? img;
MessageBean(this.role,this.content,this.img);
factory MessageBean.fromJson(Map<String, dynamic> json) => _$MessageBeanFromJson(json);
Map<String, dynamic> toJson() => _$MessageBeanToJson(this);
}