toJson method

Map<String, dynamic> toJson()

Implementation

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