2024-09-16 18:14:23 +00:00
|
|
|
import 'package:json_annotation/json_annotation.dart';
|
2024-05-18 10:17:16 +00:00
|
|
|
import 'package:solian/models/account.dart';
|
|
|
|
|
2024-09-07 07:36:06 +00:00
|
|
|
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,
|
|
|
|
});
|
|
|
|
|
2024-09-07 07:36:06 +00:00
|
|
|
factory Relationship.fromJson(Map<String, dynamic> json) =>
|
|
|
|
_$RelationshipFromJson(json);
|
2024-05-18 10:17:16 +00:00
|
|
|
|
2024-09-07 07:36:06 +00:00
|
|
|
Map<String, dynamic> toJson() => _$RelationshipToJson(this);
|
2024-05-18 10:17:16 +00:00
|
|
|
}
|