Solian/lib/models/relations.dart

35 lines
773 B
Dart
Raw Normal View History

import 'package:freezed_annotation/freezed_annotation.dart';
2024-05-18 10:17:16 +00:00
import 'package:solian/models/account.dart';
part 'relations.g.dart';
@JsonSerializable()
2024-07-23 17:17:41 +00:00
class Relationship {
2024-05-18 10:17:16 +00:00
int id;
DateTime createdAt;
DateTime updatedAt;
DateTime? deletedAt;
int accountId;
int relatedId;
Account account;
Account related;
int status;
2024-07-23 17:17:41 +00:00
Relationship({
2024-05-18 10:17:16 +00:00
required this.id,
required this.createdAt,
required this.updatedAt,
2024-05-28 16:14:41 +00:00
required this.deletedAt,
2024-05-18 10:17:16 +00:00
required this.accountId,
required this.relatedId,
required this.account,
required this.related,
required this.status,
});
factory Relationship.fromJson(Map<String, dynamic> json) =>
_$RelationshipFromJson(json);
2024-05-18 10:17:16 +00:00
Map<String, dynamic> toJson() => _$RelationshipToJson(this);
2024-05-18 10:17:16 +00:00
}