toJson method
Implementation
Map<String, dynamic> toJson() => {
'id': id,
//数据库存储不支持枚举等复合类型
'ownerType': ownerType.toString(),
'content': content,
'createdAt': createdAt,
'avatar': avatar,
'ownerName': ownerName,
};