Solian/lib/models/relations.dart

35 lines
773 B
Dart
Raw Normal View History

import 'package:freezed_annotation/freezed_annotation.dart';
2024-05-18 18:17:16 +08:00
import 'package:solian/models/account.dart';
part 'relations.g.dart';
@JsonSerializable()
2024-07-24 01:17:41 +08:00
class Relationship {
2024-05-18 18:17:16 +08:00
int id;
DateTime createdAt;
DateTime updatedAt;
DateTime? deletedAt;
int accountId;
int relatedId;
Account account;
Account related;
int status;
2024-07-24 01:17:41 +08:00
Relationship({
2024-05-18 18:17:16 +08:00
required this.id,
required this.createdAt,
required this.updatedAt,
2024-05-29 00:14:41 +08:00
required this.deletedAt,
2024-05-18 18:17:16 +08: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 18:17:16 +08:00
Map<String, dynamic> toJson() => _$RelationshipToJson(this);
2024-05-18 18:17:16 +08:00
}