Merge pull request #289 from Oloodi/view_orders

view shits of ordes by date
This commit is contained in:
José Salazar
2026-01-23 21:15:35 -05:00
committed by GitHub
20 changed files with 20246 additions and 18735 deletions

View File

@@ -1,16 +1,16 @@
# Basic Usage
```dart
ExampleConnector.instance.createAccount(createAccountVariables).execute();
ExampleConnector.instance.updateAccount(updateAccountVariables).execute();
ExampleConnector.instance.deleteAccount(deleteAccountVariables).execute();
ExampleConnector.instance.listBenefitsData(listBenefitsDataVariables).execute();
ExampleConnector.instance.getBenefitsDataByKey(getBenefitsDataByKeyVariables).execute();
ExampleConnector.instance.listBenefitsDataByStaffId(listBenefitsDataByStaffIdVariables).execute();
ExampleConnector.instance.listBenefitsDataByVendorBenefitPlanId(listBenefitsDataByVendorBenefitPlanIdVariables).execute();
ExampleConnector.instance.listBenefitsDataByVendorBenefitPlanIds(listBenefitsDataByVendorBenefitPlanIdsVariables).execute();
ExampleConnector.instance.createConversation(createConversationVariables).execute();
ExampleConnector.instance.updateConversation(updateConversationVariables).execute();
ExampleConnector.instance.getStaffDocumentByKey(getStaffDocumentByKeyVariables).execute();
ExampleConnector.instance.listStaffDocumentsByStaffId(listStaffDocumentsByStaffIdVariables).execute();
ExampleConnector.instance.listStaffDocumentsByDocumentType(listStaffDocumentsByDocumentTypeVariables).execute();
ExampleConnector.instance.listStaffDocumentsByStatus(listStaffDocumentsByStatusVariables).execute();
ExampleConnector.instance.createTeam(createTeamVariables).execute();
ExampleConnector.instance.updateTeam(updateTeamVariables).execute();
ExampleConnector.instance.deleteTeam(deleteTeamVariables).execute();
ExampleConnector.instance.listInvoiceTemplates(listInvoiceTemplatesVariables).execute();
ExampleConnector.instance.getInvoiceTemplateById(getInvoiceTemplateByIdVariables).execute();
ExampleConnector.instance.listInvoiceTemplatesByOwnerId(listInvoiceTemplatesByOwnerIdVariables).execute();
```
@@ -23,8 +23,8 @@ Optional fields can be discovered based on classes that have `Optional` object t
This is an example of a mutation with an optional field:
```dart
await ExampleConnector.instance.filterVendorBenefitPlans({ ... })
.vendorId(...)
await ExampleConnector.instance.updateMessage({ ... })
.conversationId(...)
.execute();
```

View File

@@ -0,0 +1,267 @@
part of 'generated.dart';
class ListAcceptedApplicationsByBusinessForDayVariablesBuilder {
String businessId;
Timestamp dayStart;
Timestamp dayEnd;
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
final FirebaseDataConnect _dataConnect; ListAcceptedApplicationsByBusinessForDayVariablesBuilder offset(int? t) {
_offset.value = t;
return this;
}
ListAcceptedApplicationsByBusinessForDayVariablesBuilder limit(int? t) {
_limit.value = t;
return this;
}
ListAcceptedApplicationsByBusinessForDayVariablesBuilder(this._dataConnect, {required this.businessId,required this.dayStart,required this.dayEnd,});
Deserializer<ListAcceptedApplicationsByBusinessForDayData> dataDeserializer = (dynamic json) => ListAcceptedApplicationsByBusinessForDayData.fromJson(jsonDecode(json));
Serializer<ListAcceptedApplicationsByBusinessForDayVariables> varsSerializer = (ListAcceptedApplicationsByBusinessForDayVariables vars) => jsonEncode(vars.toJson());
Future<QueryResult<ListAcceptedApplicationsByBusinessForDayData, ListAcceptedApplicationsByBusinessForDayVariables>> execute() {
return ref().execute();
}
QueryRef<ListAcceptedApplicationsByBusinessForDayData, ListAcceptedApplicationsByBusinessForDayVariables> ref() {
ListAcceptedApplicationsByBusinessForDayVariables vars= ListAcceptedApplicationsByBusinessForDayVariables(businessId: businessId,dayStart: dayStart,dayEnd: dayEnd,offset: _offset,limit: _limit,);
return _dataConnect.query("listAcceptedApplicationsByBusinessForDay", dataDeserializer, varsSerializer, vars);
}
}
@immutable
class ListAcceptedApplicationsByBusinessForDayApplications {
final String id;
final String shiftId;
final String roleId;
final Timestamp? checkInTime;
final Timestamp? checkOutTime;
final Timestamp? appliedAt;
final ListAcceptedApplicationsByBusinessForDayApplicationsStaff staff;
ListAcceptedApplicationsByBusinessForDayApplications.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
shiftId = nativeFromJson<String>(json['shiftId']),
roleId = nativeFromJson<String>(json['roleId']),
checkInTime = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']),
checkOutTime = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']),
appliedAt = json['appliedAt'] == null ? null : Timestamp.fromJson(json['appliedAt']),
staff = ListAcceptedApplicationsByBusinessForDayApplicationsStaff.fromJson(json['staff']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListAcceptedApplicationsByBusinessForDayApplications otherTyped = other as ListAcceptedApplicationsByBusinessForDayApplications;
return id == otherTyped.id &&
shiftId == otherTyped.shiftId &&
roleId == otherTyped.roleId &&
checkInTime == otherTyped.checkInTime &&
checkOutTime == otherTyped.checkOutTime &&
appliedAt == otherTyped.appliedAt &&
staff == otherTyped.staff;
}
@override
int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, roleId.hashCode, checkInTime.hashCode, checkOutTime.hashCode, appliedAt.hashCode, staff.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['id'] = nativeToJson<String>(id);
json['shiftId'] = nativeToJson<String>(shiftId);
json['roleId'] = nativeToJson<String>(roleId);
if (checkInTime != null) {
json['checkInTime'] = checkInTime!.toJson();
}
if (checkOutTime != null) {
json['checkOutTime'] = checkOutTime!.toJson();
}
if (appliedAt != null) {
json['appliedAt'] = appliedAt!.toJson();
}
json['staff'] = staff.toJson();
return json;
}
ListAcceptedApplicationsByBusinessForDayApplications({
required this.id,
required this.shiftId,
required this.roleId,
this.checkInTime,
this.checkOutTime,
this.appliedAt,
required this.staff,
});
}
@immutable
class ListAcceptedApplicationsByBusinessForDayApplicationsStaff {
final String id;
final String fullName;
final String? email;
final String? phone;
final String? photoUrl;
ListAcceptedApplicationsByBusinessForDayApplicationsStaff.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
fullName = nativeFromJson<String>(json['fullName']),
email = json['email'] == null ? null : nativeFromJson<String>(json['email']),
phone = json['phone'] == null ? null : nativeFromJson<String>(json['phone']),
photoUrl = json['photoUrl'] == null ? null : nativeFromJson<String>(json['photoUrl']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListAcceptedApplicationsByBusinessForDayApplicationsStaff otherTyped = other as ListAcceptedApplicationsByBusinessForDayApplicationsStaff;
return id == otherTyped.id &&
fullName == otherTyped.fullName &&
email == otherTyped.email &&
phone == otherTyped.phone &&
photoUrl == otherTyped.photoUrl;
}
@override
int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode, email.hashCode, phone.hashCode, photoUrl.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['id'] = nativeToJson<String>(id);
json['fullName'] = nativeToJson<String>(fullName);
if (email != null) {
json['email'] = nativeToJson<String?>(email);
}
if (phone != null) {
json['phone'] = nativeToJson<String?>(phone);
}
if (photoUrl != null) {
json['photoUrl'] = nativeToJson<String?>(photoUrl);
}
return json;
}
ListAcceptedApplicationsByBusinessForDayApplicationsStaff({
required this.id,
required this.fullName,
this.email,
this.phone,
this.photoUrl,
});
}
@immutable
class ListAcceptedApplicationsByBusinessForDayData {
final List<ListAcceptedApplicationsByBusinessForDayApplications> applications;
ListAcceptedApplicationsByBusinessForDayData.fromJson(dynamic json):
applications = (json['applications'] as List<dynamic>)
.map((e) => ListAcceptedApplicationsByBusinessForDayApplications.fromJson(e))
.toList();
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListAcceptedApplicationsByBusinessForDayData otherTyped = other as ListAcceptedApplicationsByBusinessForDayData;
return applications == otherTyped.applications;
}
@override
int get hashCode => applications.hashCode;
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['applications'] = applications.map((e) => e.toJson()).toList();
return json;
}
ListAcceptedApplicationsByBusinessForDayData({
required this.applications,
});
}
@immutable
class ListAcceptedApplicationsByBusinessForDayVariables {
final String businessId;
final Timestamp dayStart;
final Timestamp dayEnd;
late final Optional<int>offset;
late final Optional<int>limit;
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
ListAcceptedApplicationsByBusinessForDayVariables.fromJson(Map<String, dynamic> json):
businessId = nativeFromJson<String>(json['businessId']),
dayStart = Timestamp.fromJson(json['dayStart']),
dayEnd = Timestamp.fromJson(json['dayEnd']) {
offset = Optional.optional(nativeFromJson, nativeToJson);
offset.value = json['offset'] == null ? null : nativeFromJson<int>(json['offset']);
limit = Optional.optional(nativeFromJson, nativeToJson);
limit.value = json['limit'] == null ? null : nativeFromJson<int>(json['limit']);
}
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListAcceptedApplicationsByBusinessForDayVariables otherTyped = other as ListAcceptedApplicationsByBusinessForDayVariables;
return businessId == otherTyped.businessId &&
dayStart == otherTyped.dayStart &&
dayEnd == otherTyped.dayEnd &&
offset == otherTyped.offset &&
limit == otherTyped.limit;
}
@override
int get hashCode => Object.hashAll([businessId.hashCode, dayStart.hashCode, dayEnd.hashCode, offset.hashCode, limit.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['businessId'] = nativeToJson<String>(businessId);
json['dayStart'] = dayStart.toJson();
json['dayEnd'] = dayEnd.toJson();
if(offset.state == OptionalState.set) {
json['offset'] = offset.toJson();
}
if(limit.state == OptionalState.set) {
json['limit'] = limit.toJson();
}
return json;
}
ListAcceptedApplicationsByBusinessForDayVariables({
required this.businessId,
required this.dayStart,
required this.dayEnd,
required this.offset,
required this.limit,
});
}

View File

@@ -0,0 +1,243 @@
part of 'generated.dart';
class ListAcceptedApplicationsByShiftRoleKeyVariablesBuilder {
String shiftId;
String roleId;
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
final FirebaseDataConnect _dataConnect; ListAcceptedApplicationsByShiftRoleKeyVariablesBuilder offset(int? t) {
_offset.value = t;
return this;
}
ListAcceptedApplicationsByShiftRoleKeyVariablesBuilder limit(int? t) {
_limit.value = t;
return this;
}
ListAcceptedApplicationsByShiftRoleKeyVariablesBuilder(this._dataConnect, {required this.shiftId,required this.roleId,});
Deserializer<ListAcceptedApplicationsByShiftRoleKeyData> dataDeserializer = (dynamic json) => ListAcceptedApplicationsByShiftRoleKeyData.fromJson(jsonDecode(json));
Serializer<ListAcceptedApplicationsByShiftRoleKeyVariables> varsSerializer = (ListAcceptedApplicationsByShiftRoleKeyVariables vars) => jsonEncode(vars.toJson());
Future<QueryResult<ListAcceptedApplicationsByShiftRoleKeyData, ListAcceptedApplicationsByShiftRoleKeyVariables>> execute() {
return ref().execute();
}
QueryRef<ListAcceptedApplicationsByShiftRoleKeyData, ListAcceptedApplicationsByShiftRoleKeyVariables> ref() {
ListAcceptedApplicationsByShiftRoleKeyVariables vars= ListAcceptedApplicationsByShiftRoleKeyVariables(shiftId: shiftId,roleId: roleId,offset: _offset,limit: _limit,);
return _dataConnect.query("listAcceptedApplicationsByShiftRoleKey", dataDeserializer, varsSerializer, vars);
}
}
@immutable
class ListAcceptedApplicationsByShiftRoleKeyApplications {
final String id;
final Timestamp? checkInTime;
final Timestamp? checkOutTime;
final ListAcceptedApplicationsByShiftRoleKeyApplicationsStaff staff;
ListAcceptedApplicationsByShiftRoleKeyApplications.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
checkInTime = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']),
checkOutTime = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']),
staff = ListAcceptedApplicationsByShiftRoleKeyApplicationsStaff.fromJson(json['staff']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListAcceptedApplicationsByShiftRoleKeyApplications otherTyped = other as ListAcceptedApplicationsByShiftRoleKeyApplications;
return id == otherTyped.id &&
checkInTime == otherTyped.checkInTime &&
checkOutTime == otherTyped.checkOutTime &&
staff == otherTyped.staff;
}
@override
int get hashCode => Object.hashAll([id.hashCode, checkInTime.hashCode, checkOutTime.hashCode, staff.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['id'] = nativeToJson<String>(id);
if (checkInTime != null) {
json['checkInTime'] = checkInTime!.toJson();
}
if (checkOutTime != null) {
json['checkOutTime'] = checkOutTime!.toJson();
}
json['staff'] = staff.toJson();
return json;
}
ListAcceptedApplicationsByShiftRoleKeyApplications({
required this.id,
this.checkInTime,
this.checkOutTime,
required this.staff,
});
}
@immutable
class ListAcceptedApplicationsByShiftRoleKeyApplicationsStaff {
final String id;
final String fullName;
final String? email;
final String? phone;
final String? photoUrl;
ListAcceptedApplicationsByShiftRoleKeyApplicationsStaff.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
fullName = nativeFromJson<String>(json['fullName']),
email = json['email'] == null ? null : nativeFromJson<String>(json['email']),
phone = json['phone'] == null ? null : nativeFromJson<String>(json['phone']),
photoUrl = json['photoUrl'] == null ? null : nativeFromJson<String>(json['photoUrl']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListAcceptedApplicationsByShiftRoleKeyApplicationsStaff otherTyped = other as ListAcceptedApplicationsByShiftRoleKeyApplicationsStaff;
return id == otherTyped.id &&
fullName == otherTyped.fullName &&
email == otherTyped.email &&
phone == otherTyped.phone &&
photoUrl == otherTyped.photoUrl;
}
@override
int get hashCode => Object.hashAll([id.hashCode, fullName.hashCode, email.hashCode, phone.hashCode, photoUrl.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['id'] = nativeToJson<String>(id);
json['fullName'] = nativeToJson<String>(fullName);
if (email != null) {
json['email'] = nativeToJson<String?>(email);
}
if (phone != null) {
json['phone'] = nativeToJson<String?>(phone);
}
if (photoUrl != null) {
json['photoUrl'] = nativeToJson<String?>(photoUrl);
}
return json;
}
ListAcceptedApplicationsByShiftRoleKeyApplicationsStaff({
required this.id,
required this.fullName,
this.email,
this.phone,
this.photoUrl,
});
}
@immutable
class ListAcceptedApplicationsByShiftRoleKeyData {
final List<ListAcceptedApplicationsByShiftRoleKeyApplications> applications;
ListAcceptedApplicationsByShiftRoleKeyData.fromJson(dynamic json):
applications = (json['applications'] as List<dynamic>)
.map((e) => ListAcceptedApplicationsByShiftRoleKeyApplications.fromJson(e))
.toList();
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListAcceptedApplicationsByShiftRoleKeyData otherTyped = other as ListAcceptedApplicationsByShiftRoleKeyData;
return applications == otherTyped.applications;
}
@override
int get hashCode => applications.hashCode;
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['applications'] = applications.map((e) => e.toJson()).toList();
return json;
}
ListAcceptedApplicationsByShiftRoleKeyData({
required this.applications,
});
}
@immutable
class ListAcceptedApplicationsByShiftRoleKeyVariables {
final String shiftId;
final String roleId;
late final Optional<int>offset;
late final Optional<int>limit;
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
ListAcceptedApplicationsByShiftRoleKeyVariables.fromJson(Map<String, dynamic> json):
shiftId = nativeFromJson<String>(json['shiftId']),
roleId = nativeFromJson<String>(json['roleId']) {
offset = Optional.optional(nativeFromJson, nativeToJson);
offset.value = json['offset'] == null ? null : nativeFromJson<int>(json['offset']);
limit = Optional.optional(nativeFromJson, nativeToJson);
limit.value = json['limit'] == null ? null : nativeFromJson<int>(json['limit']);
}
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListAcceptedApplicationsByShiftRoleKeyVariables otherTyped = other as ListAcceptedApplicationsByShiftRoleKeyVariables;
return shiftId == otherTyped.shiftId &&
roleId == otherTyped.roleId &&
offset == otherTyped.offset &&
limit == otherTyped.limit;
}
@override
int get hashCode => Object.hashAll([shiftId.hashCode, roleId.hashCode, offset.hashCode, limit.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['shiftId'] = nativeToJson<String>(shiftId);
json['roleId'] = nativeToJson<String>(roleId);
if(offset.state == OptionalState.set) {
json['offset'] = offset.toJson();
}
if(limit.state == OptionalState.set) {
json['limit'] = limit.toJson();
}
return json;
}
ListAcceptedApplicationsByShiftRoleKeyVariables({
required this.shiftId,
required this.roleId,
required this.offset,
required this.limit,
});
}

View File

@@ -0,0 +1,364 @@
part of 'generated.dart';
class ListShiftRolesByBusinessAndDateRangeVariablesBuilder {
String businessId;
Timestamp start;
Timestamp end;
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
final FirebaseDataConnect _dataConnect; ListShiftRolesByBusinessAndDateRangeVariablesBuilder offset(int? t) {
_offset.value = t;
return this;
}
ListShiftRolesByBusinessAndDateRangeVariablesBuilder limit(int? t) {
_limit.value = t;
return this;
}
ListShiftRolesByBusinessAndDateRangeVariablesBuilder(this._dataConnect, {required this.businessId,required this.start,required this.end,});
Deserializer<ListShiftRolesByBusinessAndDateRangeData> dataDeserializer = (dynamic json) => ListShiftRolesByBusinessAndDateRangeData.fromJson(jsonDecode(json));
Serializer<ListShiftRolesByBusinessAndDateRangeVariables> varsSerializer = (ListShiftRolesByBusinessAndDateRangeVariables vars) => jsonEncode(vars.toJson());
Future<QueryResult<ListShiftRolesByBusinessAndDateRangeData, ListShiftRolesByBusinessAndDateRangeVariables>> execute() {
return ref().execute();
}
QueryRef<ListShiftRolesByBusinessAndDateRangeData, ListShiftRolesByBusinessAndDateRangeVariables> ref() {
ListShiftRolesByBusinessAndDateRangeVariables vars= ListShiftRolesByBusinessAndDateRangeVariables(businessId: businessId,start: start,end: end,offset: _offset,limit: _limit,);
return _dataConnect.query("listShiftRolesByBusinessAndDateRange", dataDeserializer, varsSerializer, vars);
}
}
@immutable
class ListShiftRolesByBusinessAndDateRangeShiftRoles {
final String shiftId;
final String roleId;
final int count;
final int? assigned;
final double? hours;
final Timestamp? startTime;
final Timestamp? endTime;
final double? totalValue;
final ListShiftRolesByBusinessAndDateRangeShiftRolesRole role;
final ListShiftRolesByBusinessAndDateRangeShiftRolesShift shift;
ListShiftRolesByBusinessAndDateRangeShiftRoles.fromJson(dynamic json):
shiftId = nativeFromJson<String>(json['shiftId']),
roleId = nativeFromJson<String>(json['roleId']),
count = nativeFromJson<int>(json['count']),
assigned = json['assigned'] == null ? null : nativeFromJson<int>(json['assigned']),
hours = json['hours'] == null ? null : nativeFromJson<double>(json['hours']),
startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']),
endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']),
totalValue = json['totalValue'] == null ? null : nativeFromJson<double>(json['totalValue']),
role = ListShiftRolesByBusinessAndDateRangeShiftRolesRole.fromJson(json['role']),
shift = ListShiftRolesByBusinessAndDateRangeShiftRolesShift.fromJson(json['shift']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessAndDateRangeShiftRoles otherTyped = other as ListShiftRolesByBusinessAndDateRangeShiftRoles;
return shiftId == otherTyped.shiftId &&
roleId == otherTyped.roleId &&
count == otherTyped.count &&
assigned == otherTyped.assigned &&
hours == otherTyped.hours &&
startTime == otherTyped.startTime &&
endTime == otherTyped.endTime &&
totalValue == otherTyped.totalValue &&
role == otherTyped.role &&
shift == otherTyped.shift;
}
@override
int get hashCode => Object.hashAll([shiftId.hashCode, roleId.hashCode, count.hashCode, assigned.hashCode, hours.hashCode, startTime.hashCode, endTime.hashCode, totalValue.hashCode, role.hashCode, shift.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['shiftId'] = nativeToJson<String>(shiftId);
json['roleId'] = nativeToJson<String>(roleId);
json['count'] = nativeToJson<int>(count);
if (assigned != null) {
json['assigned'] = nativeToJson<int?>(assigned);
}
if (hours != null) {
json['hours'] = nativeToJson<double?>(hours);
}
if (startTime != null) {
json['startTime'] = startTime!.toJson();
}
if (endTime != null) {
json['endTime'] = endTime!.toJson();
}
if (totalValue != null) {
json['totalValue'] = nativeToJson<double?>(totalValue);
}
json['role'] = role.toJson();
json['shift'] = shift.toJson();
return json;
}
ListShiftRolesByBusinessAndDateRangeShiftRoles({
required this.shiftId,
required this.roleId,
required this.count,
this.assigned,
this.hours,
this.startTime,
this.endTime,
this.totalValue,
required this.role,
required this.shift,
});
}
@immutable
class ListShiftRolesByBusinessAndDateRangeShiftRolesRole {
final String id;
final String name;
ListShiftRolesByBusinessAndDateRangeShiftRolesRole.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
name = nativeFromJson<String>(json['name']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessAndDateRangeShiftRolesRole otherTyped = other as ListShiftRolesByBusinessAndDateRangeShiftRolesRole;
return id == otherTyped.id &&
name == otherTyped.name;
}
@override
int get hashCode => Object.hashAll([id.hashCode, name.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['id'] = nativeToJson<String>(id);
json['name'] = nativeToJson<String>(name);
return json;
}
ListShiftRolesByBusinessAndDateRangeShiftRolesRole({
required this.id,
required this.name,
});
}
@immutable
class ListShiftRolesByBusinessAndDateRangeShiftRolesShift {
final String id;
final Timestamp? date;
final String? location;
final String? locationAddress;
final String title;
final ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder order;
ListShiftRolesByBusinessAndDateRangeShiftRolesShift.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']),
date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
locationAddress = json['locationAddress'] == null ? null : nativeFromJson<String>(json['locationAddress']),
title = nativeFromJson<String>(json['title']),
order = ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder.fromJson(json['order']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessAndDateRangeShiftRolesShift otherTyped = other as ListShiftRolesByBusinessAndDateRangeShiftRolesShift;
return id == otherTyped.id &&
date == otherTyped.date &&
location == otherTyped.location &&
locationAddress == otherTyped.locationAddress &&
title == otherTyped.title &&
order == otherTyped.order;
}
@override
int get hashCode => Object.hashAll([id.hashCode, date.hashCode, location.hashCode, locationAddress.hashCode, title.hashCode, order.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['id'] = nativeToJson<String>(id);
if (date != null) {
json['date'] = date!.toJson();
}
if (location != null) {
json['location'] = nativeToJson<String?>(location);
}
if (locationAddress != null) {
json['locationAddress'] = nativeToJson<String?>(locationAddress);
}
json['title'] = nativeToJson<String>(title);
json['order'] = order.toJson();
return json;
}
ListShiftRolesByBusinessAndDateRangeShiftRolesShift({
required this.id,
this.date,
this.location,
this.locationAddress,
required this.title,
required this.order,
});
}
@immutable
class ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder {
final String id;
ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder.fromJson(dynamic json):
id = nativeFromJson<String>(json['id']);
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder otherTyped = other as ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder;
return id == otherTyped.id;
}
@override
int get hashCode => id.hashCode;
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['id'] = nativeToJson<String>(id);
return json;
}
ListShiftRolesByBusinessAndDateRangeShiftRolesShiftOrder({
required this.id,
});
}
@immutable
class ListShiftRolesByBusinessAndDateRangeData {
final List<ListShiftRolesByBusinessAndDateRangeShiftRoles> shiftRoles;
ListShiftRolesByBusinessAndDateRangeData.fromJson(dynamic json):
shiftRoles = (json['shiftRoles'] as List<dynamic>)
.map((e) => ListShiftRolesByBusinessAndDateRangeShiftRoles.fromJson(e))
.toList();
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessAndDateRangeData otherTyped = other as ListShiftRolesByBusinessAndDateRangeData;
return shiftRoles == otherTyped.shiftRoles;
}
@override
int get hashCode => shiftRoles.hashCode;
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['shiftRoles'] = shiftRoles.map((e) => e.toJson()).toList();
return json;
}
ListShiftRolesByBusinessAndDateRangeData({
required this.shiftRoles,
});
}
@immutable
class ListShiftRolesByBusinessAndDateRangeVariables {
final String businessId;
final Timestamp start;
final Timestamp end;
late final Optional<int>offset;
late final Optional<int>limit;
@Deprecated('fromJson is deprecated for Variable classes as they are no longer required for deserialization.')
ListShiftRolesByBusinessAndDateRangeVariables.fromJson(Map<String, dynamic> json):
businessId = nativeFromJson<String>(json['businessId']),
start = Timestamp.fromJson(json['start']),
end = Timestamp.fromJson(json['end']) {
offset = Optional.optional(nativeFromJson, nativeToJson);
offset.value = json['offset'] == null ? null : nativeFromJson<int>(json['offset']);
limit = Optional.optional(nativeFromJson, nativeToJson);
limit.value = json['limit'] == null ? null : nativeFromJson<int>(json['limit']);
}
@override
bool operator ==(Object other) {
if(identical(this, other)) {
return true;
}
if(other.runtimeType != runtimeType) {
return false;
}
final ListShiftRolesByBusinessAndDateRangeVariables otherTyped = other as ListShiftRolesByBusinessAndDateRangeVariables;
return businessId == otherTyped.businessId &&
start == otherTyped.start &&
end == otherTyped.end &&
offset == otherTyped.offset &&
limit == otherTyped.limit;
}
@override
int get hashCode => Object.hashAll([businessId.hashCode, start.hashCode, end.hashCode, offset.hashCode, limit.hashCode]);
Map<String, dynamic> toJson() {
Map<String, dynamic> json = {};
json['businessId'] = nativeToJson<String>(businessId);
json['start'] = start.toJson();
json['end'] = end.toJson();
if(offset.state == OptionalState.set) {
json['offset'] = offset.toJson();
}
if(limit.state == OptionalState.set) {
json['limit'] = limit.toJson();
}
return json;
}
ListShiftRolesByBusinessAndDateRangeVariables({
required this.businessId,
required this.start,
required this.end,
required this.offset,
required this.limit,
});
}