Skip to content

Commit 6d2a104

Browse files
Implement one centrakl hub stream for real time object manipulation
1 parent dd10c10 commit 6d2a104

42 files changed

Lines changed: 4083 additions & 3599 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

school_data_hub_client/lib/src/protocol/_features/attendance/models/missed_schoolday_dto.dart

Lines changed: 0 additions & 81 deletions
This file was deleted.
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
/* AUTOMATICALLY GENERATED CODE DO NOT MODIFY */
2+
/* To generate run: "serverpod generate" */
3+
4+
// ignore_for_file: implementation_imports
5+
// ignore_for_file: library_private_types_in_public_api
6+
// ignore_for_file: non_constant_identifier_names
7+
// ignore_for_file: public_member_api_docs
8+
// ignore_for_file: type_literal_in_constant_pattern
9+
// ignore_for_file: use_super_parameters
10+
11+
// ignore_for_file: no_leading_underscores_for_library_prefixes
12+
import 'package:serverpod_client/serverpod_client.dart' as _i1;
13+
import '../../../_features/hub/models/hub_object_type.dart' as _i2;
14+
15+
abstract class HubDeleteEvent implements _i1.SerializableModel {
16+
HubDeleteEvent._({
17+
required this.id,
18+
required this.objectType,
19+
});
20+
21+
factory HubDeleteEvent({
22+
required int id,
23+
required _i2.HubObjectType objectType,
24+
}) = _HubDeleteEventImpl;
25+
26+
factory HubDeleteEvent.fromJson(Map<String, dynamic> jsonSerialization) {
27+
return HubDeleteEvent(
28+
id: jsonSerialization['id'] as int,
29+
objectType:
30+
_i2.HubObjectType.fromJson((jsonSerialization['objectType'] as int)),
31+
);
32+
}
33+
34+
_i2.HubObjectType objectType;
35+
36+
int id;
37+
38+
/// Returns a shallow copy of this [HubDeleteEvent]
39+
/// with some or all fields replaced by the given arguments.
40+
@_i1.useResult
41+
HubDeleteEvent copyWith({
42+
int? id,
43+
_i2.HubObjectType? objectType,
44+
});
45+
@override
46+
Map<String, dynamic> toJson() {
47+
return {
48+
'id': id,
49+
'objectType': objectType.toJson(),
50+
};
51+
}
52+
53+
@override
54+
String toString() {
55+
return _i1.SerializationManager.encode(this);
56+
}
57+
}
58+
59+
class _HubDeleteEventImpl extends HubDeleteEvent {
60+
_HubDeleteEventImpl({
61+
required int id,
62+
required _i2.HubObjectType objectType,
63+
}) : super._(
64+
id: id,
65+
objectType: objectType,
66+
);
67+
68+
/// Returns a shallow copy of this [HubDeleteEvent]
69+
/// with some or all fields replaced by the given arguments.
70+
@_i1.useResult
71+
@override
72+
HubDeleteEvent copyWith({
73+
int? id,
74+
_i2.HubObjectType? objectType,
75+
}) {
76+
return HubDeleteEvent(
77+
id: id ?? this.id,
78+
objectType: objectType ?? this.objectType,
79+
);
80+
}
81+
}
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/* AUTOMATICALLY GENERATED CODE DO NOT MODIFY */
2+
/* To generate run: "serverpod generate" */
3+
4+
// ignore_for_file: implementation_imports
5+
// ignore_for_file: library_private_types_in_public_api
6+
// ignore_for_file: non_constant_identifier_names
7+
// ignore_for_file: public_member_api_docs
8+
// ignore_for_file: type_literal_in_constant_pattern
9+
// ignore_for_file: use_super_parameters
10+
11+
// ignore_for_file: no_leading_underscores_for_library_prefixes
12+
import 'package:serverpod_client/serverpod_client.dart' as _i1;
13+
14+
enum HubObjectType implements _i1.SerializableModel {
15+
pupilData,
16+
missedSchoolday,
17+
schooldayEvent,
18+
schoolList;
19+
20+
static HubObjectType fromJson(int index) {
21+
switch (index) {
22+
case 0:
23+
return HubObjectType.pupilData;
24+
case 1:
25+
return HubObjectType.missedSchoolday;
26+
case 2:
27+
return HubObjectType.schooldayEvent;
28+
case 3:
29+
return HubObjectType.schoolList;
30+
default:
31+
throw ArgumentError(
32+
'Value "$index" cannot be converted to "HubObjectType"');
33+
}
34+
}
35+
36+
@override
37+
int toJson() => index;
38+
39+
@override
40+
String toString() => name;
41+
}

0 commit comments

Comments
 (0)