SimpleCloudNotifier/flutter/lib/models/subscription.dart

32 lines
948 B
Dart
Raw Normal View History

2024-02-18 17:36:58 +01:00
class Subscription {
final String subscriptionID;
final String subscriberUserID;
final String channelOwnerUserID;
final String channelID;
final String channelInternalName;
final String timestampCreated;
final bool confirmed;
const Subscription({
required this.subscriptionID,
required this.subscriberUserID,
required this.channelOwnerUserID,
required this.channelID,
required this.channelInternalName,
required this.timestampCreated,
required this.confirmed,
});
factory Subscription.fromJson(Map<String, dynamic> json) {
2024-05-25 18:09:39 +02:00
return Subscription(
subscriptionID: json['subscription_id'],
subscriberUserID: json['subscriber_user_id'],
channelOwnerUserID: json['channel_owner_user_id'],
channelID: json['channel_id'],
channelInternalName: json['channel_internal_name'],
timestampCreated: json['timestamp_created'],
confirmed: json['confirmed'],
);
2024-02-18 17:36:58 +01:00
}
}