2023-10-17 08:48:58 +02:00
|
|
|
import 'package:appflowy_backend/protobuf/flowy-user/protobuf.dart';
|
|
|
|
|
2024-01-24 15:15:57 +01:00
|
|
|
class ReminderMetaKeys {
|
|
|
|
static String includeTime = "include_time";
|
|
|
|
static String blockId = "block_id";
|
|
|
|
static String rowId = "row_id";
|
2024-07-31 15:15:15 +08:00
|
|
|
static String createdAt = "created_at";
|
|
|
|
static String isArchived = "is_archived";
|
2023-10-17 08:48:58 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
extension ReminderExtension on ReminderPB {
|
|
|
|
bool? get includeTime {
|
2024-01-24 15:15:57 +01:00
|
|
|
final String? includeTimeStr = meta[ReminderMetaKeys.includeTime];
|
2023-10-17 08:48:58 +02:00
|
|
|
|
|
|
|
return includeTimeStr != null ? includeTimeStr == true.toString() : null;
|
|
|
|
}
|
2024-07-31 15:15:15 +08:00
|
|
|
|
|
|
|
String? get blockId => meta[ReminderMetaKeys.blockId];
|
|
|
|
|
|
|
|
String? get rowId => meta[ReminderMetaKeys.rowId];
|
|
|
|
|
|
|
|
int? get createdAt {
|
|
|
|
final t = meta[ReminderMetaKeys.createdAt];
|
|
|
|
return t != null ? int.tryParse(t) : null;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool get isArchived {
|
|
|
|
final t = meta[ReminderMetaKeys.isArchived];
|
|
|
|
return t != null ? t == true.toString() : false;
|
|
|
|
}
|
2023-10-17 08:48:58 +02:00
|
|
|
}
|