little advance and corrections
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
# Basic Usage
|
||||
|
||||
```dart
|
||||
ExampleConnector.instance.createCategory(createCategoryVariables).execute();
|
||||
ExampleConnector.instance.updateCategory(updateCategoryVariables).execute();
|
||||
ExampleConnector.instance.deleteCategory(deleteCategoryVariables).execute();
|
||||
ExampleConnector.instance.listInvoices(listInvoicesVariables).execute();
|
||||
ExampleConnector.instance.getInvoiceById(getInvoiceByIdVariables).execute();
|
||||
ExampleConnector.instance.listInvoicesByVendorId(listInvoicesByVendorIdVariables).execute();
|
||||
ExampleConnector.instance.listInvoicesByBusinessId(listInvoicesByBusinessIdVariables).execute();
|
||||
ExampleConnector.instance.listInvoicesByOrderId(listInvoicesByOrderIdVariables).execute();
|
||||
ExampleConnector.instance.listInvoicesByStatus(listInvoicesByStatusVariables).execute();
|
||||
ExampleConnector.instance.filterInvoices(filterInvoicesVariables).execute();
|
||||
ExampleConnector.instance.createApplication(createApplicationVariables).execute();
|
||||
ExampleConnector.instance.updateApplicationStatus(updateApplicationStatusVariables).execute();
|
||||
ExampleConnector.instance.deleteApplication(deleteApplicationVariables).execute();
|
||||
ExampleConnector.instance.createStaffRole(createStaffRoleVariables).execute();
|
||||
ExampleConnector.instance.deleteStaffRole(deleteStaffRoleVariables).execute();
|
||||
ExampleConnector.instance.CreateUser(createUserVariables).execute();
|
||||
ExampleConnector.instance.UpdateUser(updateUserVariables).execute();
|
||||
ExampleConnector.instance.DeleteUser(deleteUserVariables).execute();
|
||||
ExampleConnector.instance.createUserConversation(createUserConversationVariables).execute();
|
||||
ExampleConnector.instance.updateUserConversation(updateUserConversationVariables).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.updateAttireOption({ ... })
|
||||
.itemId(...)
|
||||
await ExampleConnector.instance.filterUsers({ ... })
|
||||
.id(...)
|
||||
.execute();
|
||||
```
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,645 @@
|
||||
part of 'generated.dart';
|
||||
|
||||
class GetApplicationByStaffShiftAndRoleVariablesBuilder {
|
||||
String staffId;
|
||||
String shiftId;
|
||||
String roleId;
|
||||
Optional<int> _offset = Optional.optional(nativeFromJson, nativeToJson);
|
||||
Optional<int> _limit = Optional.optional(nativeFromJson, nativeToJson);
|
||||
|
||||
final FirebaseDataConnect _dataConnect; GetApplicationByStaffShiftAndRoleVariablesBuilder offset(int? t) {
|
||||
_offset.value = t;
|
||||
return this;
|
||||
}
|
||||
GetApplicationByStaffShiftAndRoleVariablesBuilder limit(int? t) {
|
||||
_limit.value = t;
|
||||
return this;
|
||||
}
|
||||
|
||||
GetApplicationByStaffShiftAndRoleVariablesBuilder(this._dataConnect, {required this.staffId,required this.shiftId,required this.roleId,});
|
||||
Deserializer<GetApplicationByStaffShiftAndRoleData> dataDeserializer = (dynamic json) => GetApplicationByStaffShiftAndRoleData.fromJson(jsonDecode(json));
|
||||
Serializer<GetApplicationByStaffShiftAndRoleVariables> varsSerializer = (GetApplicationByStaffShiftAndRoleVariables vars) => jsonEncode(vars.toJson());
|
||||
Future<QueryResult<GetApplicationByStaffShiftAndRoleData, GetApplicationByStaffShiftAndRoleVariables>> execute() {
|
||||
return ref().execute();
|
||||
}
|
||||
|
||||
QueryRef<GetApplicationByStaffShiftAndRoleData, GetApplicationByStaffShiftAndRoleVariables> ref() {
|
||||
GetApplicationByStaffShiftAndRoleVariables vars= GetApplicationByStaffShiftAndRoleVariables(staffId: staffId,shiftId: shiftId,roleId: roleId,offset: _offset,limit: _limit,);
|
||||
return _dataConnect.query("getApplicationByStaffShiftAndRole", dataDeserializer, varsSerializer, vars);
|
||||
}
|
||||
}
|
||||
|
||||
@immutable
|
||||
class GetApplicationByStaffShiftAndRoleApplications {
|
||||
final String id;
|
||||
final String shiftId;
|
||||
final String staffId;
|
||||
final EnumValue<ApplicationStatus> status;
|
||||
final Timestamp? appliedAt;
|
||||
final Timestamp? checkInTime;
|
||||
final Timestamp? checkOutTime;
|
||||
final EnumValue<ApplicationOrigin> origin;
|
||||
final Timestamp? createdAt;
|
||||
final GetApplicationByStaffShiftAndRoleApplicationsShift shift;
|
||||
final GetApplicationByStaffShiftAndRoleApplicationsShiftRole shiftRole;
|
||||
GetApplicationByStaffShiftAndRoleApplications.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
shiftId = nativeFromJson<String>(json['shiftId']),
|
||||
staffId = nativeFromJson<String>(json['staffId']),
|
||||
status = applicationStatusDeserializer(json['status']),
|
||||
appliedAt = json['appliedAt'] == null ? null : Timestamp.fromJson(json['appliedAt']),
|
||||
checkInTime = json['checkInTime'] == null ? null : Timestamp.fromJson(json['checkInTime']),
|
||||
checkOutTime = json['checkOutTime'] == null ? null : Timestamp.fromJson(json['checkOutTime']),
|
||||
origin = applicationOriginDeserializer(json['origin']),
|
||||
createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
|
||||
shift = GetApplicationByStaffShiftAndRoleApplicationsShift.fromJson(json['shift']),
|
||||
shiftRole = GetApplicationByStaffShiftAndRoleApplicationsShiftRole.fromJson(json['shiftRole']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if(other.runtimeType != runtimeType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final GetApplicationByStaffShiftAndRoleApplications otherTyped = other as GetApplicationByStaffShiftAndRoleApplications;
|
||||
return id == otherTyped.id &&
|
||||
shiftId == otherTyped.shiftId &&
|
||||
staffId == otherTyped.staffId &&
|
||||
status == otherTyped.status &&
|
||||
appliedAt == otherTyped.appliedAt &&
|
||||
checkInTime == otherTyped.checkInTime &&
|
||||
checkOutTime == otherTyped.checkOutTime &&
|
||||
origin == otherTyped.origin &&
|
||||
createdAt == otherTyped.createdAt &&
|
||||
shift == otherTyped.shift &&
|
||||
shiftRole == otherTyped.shiftRole;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => Object.hashAll([id.hashCode, shiftId.hashCode, staffId.hashCode, status.hashCode, appliedAt.hashCode, checkInTime.hashCode, checkOutTime.hashCode, origin.hashCode, createdAt.hashCode, shift.hashCode, shiftRole.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
json['id'] = nativeToJson<String>(id);
|
||||
json['shiftId'] = nativeToJson<String>(shiftId);
|
||||
json['staffId'] = nativeToJson<String>(staffId);
|
||||
json['status'] =
|
||||
applicationStatusSerializer(status)
|
||||
;
|
||||
if (appliedAt != null) {
|
||||
json['appliedAt'] = appliedAt!.toJson();
|
||||
}
|
||||
if (checkInTime != null) {
|
||||
json['checkInTime'] = checkInTime!.toJson();
|
||||
}
|
||||
if (checkOutTime != null) {
|
||||
json['checkOutTime'] = checkOutTime!.toJson();
|
||||
}
|
||||
json['origin'] =
|
||||
applicationOriginSerializer(origin)
|
||||
;
|
||||
if (createdAt != null) {
|
||||
json['createdAt'] = createdAt!.toJson();
|
||||
}
|
||||
json['shift'] = shift.toJson();
|
||||
json['shiftRole'] = shiftRole.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
GetApplicationByStaffShiftAndRoleApplications({
|
||||
required this.id,
|
||||
required this.shiftId,
|
||||
required this.staffId,
|
||||
required this.status,
|
||||
this.appliedAt,
|
||||
this.checkInTime,
|
||||
this.checkOutTime,
|
||||
required this.origin,
|
||||
this.createdAt,
|
||||
required this.shift,
|
||||
required this.shiftRole,
|
||||
});
|
||||
}
|
||||
|
||||
@immutable
|
||||
class GetApplicationByStaffShiftAndRoleApplicationsShift {
|
||||
final String id;
|
||||
final String title;
|
||||
final Timestamp? date;
|
||||
final Timestamp? startTime;
|
||||
final Timestamp? endTime;
|
||||
final String? location;
|
||||
final EnumValue<ShiftStatus>? status;
|
||||
final GetApplicationByStaffShiftAndRoleApplicationsShiftOrder order;
|
||||
GetApplicationByStaffShiftAndRoleApplicationsShift.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
title = nativeFromJson<String>(json['title']),
|
||||
date = json['date'] == null ? null : Timestamp.fromJson(json['date']),
|
||||
startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']),
|
||||
endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']),
|
||||
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
|
||||
status = json['status'] == null ? null : shiftStatusDeserializer(json['status']),
|
||||
order = GetApplicationByStaffShiftAndRoleApplicationsShiftOrder.fromJson(json['order']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if(other.runtimeType != runtimeType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final GetApplicationByStaffShiftAndRoleApplicationsShift otherTyped = other as GetApplicationByStaffShiftAndRoleApplicationsShift;
|
||||
return id == otherTyped.id &&
|
||||
title == otherTyped.title &&
|
||||
date == otherTyped.date &&
|
||||
startTime == otherTyped.startTime &&
|
||||
endTime == otherTyped.endTime &&
|
||||
location == otherTyped.location &&
|
||||
status == otherTyped.status &&
|
||||
order == otherTyped.order;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, location.hashCode, status.hashCode, order.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
json['id'] = nativeToJson<String>(id);
|
||||
json['title'] = nativeToJson<String>(title);
|
||||
if (date != null) {
|
||||
json['date'] = date!.toJson();
|
||||
}
|
||||
if (startTime != null) {
|
||||
json['startTime'] = startTime!.toJson();
|
||||
}
|
||||
if (endTime != null) {
|
||||
json['endTime'] = endTime!.toJson();
|
||||
}
|
||||
if (location != null) {
|
||||
json['location'] = nativeToJson<String?>(location);
|
||||
}
|
||||
if (status != null) {
|
||||
json['status'] =
|
||||
shiftStatusSerializer(status!)
|
||||
;
|
||||
}
|
||||
json['order'] = order.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
GetApplicationByStaffShiftAndRoleApplicationsShift({
|
||||
required this.id,
|
||||
required this.title,
|
||||
this.date,
|
||||
this.startTime,
|
||||
this.endTime,
|
||||
this.location,
|
||||
this.status,
|
||||
required this.order,
|
||||
});
|
||||
}
|
||||
|
||||
@immutable
|
||||
class GetApplicationByStaffShiftAndRoleApplicationsShiftOrder {
|
||||
final String id;
|
||||
final String? eventName;
|
||||
final GetApplicationByStaffShiftAndRoleApplicationsShiftOrderTeamHub teamHub;
|
||||
final GetApplicationByStaffShiftAndRoleApplicationsShiftOrderBusiness business;
|
||||
final GetApplicationByStaffShiftAndRoleApplicationsShiftOrderVendor? vendor;
|
||||
GetApplicationByStaffShiftAndRoleApplicationsShiftOrder.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
eventName = json['eventName'] == null ? null : nativeFromJson<String>(json['eventName']),
|
||||
teamHub = GetApplicationByStaffShiftAndRoleApplicationsShiftOrderTeamHub.fromJson(json['teamHub']),
|
||||
business = GetApplicationByStaffShiftAndRoleApplicationsShiftOrderBusiness.fromJson(json['business']),
|
||||
vendor = json['vendor'] == null ? null : GetApplicationByStaffShiftAndRoleApplicationsShiftOrderVendor.fromJson(json['vendor']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if(other.runtimeType != runtimeType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final GetApplicationByStaffShiftAndRoleApplicationsShiftOrder otherTyped = other as GetApplicationByStaffShiftAndRoleApplicationsShiftOrder;
|
||||
return id == otherTyped.id &&
|
||||
eventName == otherTyped.eventName &&
|
||||
teamHub == otherTyped.teamHub &&
|
||||
business == otherTyped.business &&
|
||||
vendor == otherTyped.vendor;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => Object.hashAll([id.hashCode, eventName.hashCode, teamHub.hashCode, business.hashCode, vendor.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
json['id'] = nativeToJson<String>(id);
|
||||
if (eventName != null) {
|
||||
json['eventName'] = nativeToJson<String?>(eventName);
|
||||
}
|
||||
json['teamHub'] = teamHub.toJson();
|
||||
json['business'] = business.toJson();
|
||||
if (vendor != null) {
|
||||
json['vendor'] = vendor!.toJson();
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
GetApplicationByStaffShiftAndRoleApplicationsShiftOrder({
|
||||
required this.id,
|
||||
this.eventName,
|
||||
required this.teamHub,
|
||||
required this.business,
|
||||
this.vendor,
|
||||
});
|
||||
}
|
||||
|
||||
@immutable
|
||||
class GetApplicationByStaffShiftAndRoleApplicationsShiftOrderTeamHub {
|
||||
final String address;
|
||||
final String? placeId;
|
||||
final String hubName;
|
||||
GetApplicationByStaffShiftAndRoleApplicationsShiftOrderTeamHub.fromJson(dynamic json):
|
||||
|
||||
address = nativeFromJson<String>(json['address']),
|
||||
placeId = json['placeId'] == null ? null : nativeFromJson<String>(json['placeId']),
|
||||
hubName = nativeFromJson<String>(json['hubName']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if(other.runtimeType != runtimeType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final GetApplicationByStaffShiftAndRoleApplicationsShiftOrderTeamHub otherTyped = other as GetApplicationByStaffShiftAndRoleApplicationsShiftOrderTeamHub;
|
||||
return address == otherTyped.address &&
|
||||
placeId == otherTyped.placeId &&
|
||||
hubName == otherTyped.hubName;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => Object.hashAll([address.hashCode, placeId.hashCode, hubName.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
json['address'] = nativeToJson<String>(address);
|
||||
if (placeId != null) {
|
||||
json['placeId'] = nativeToJson<String?>(placeId);
|
||||
}
|
||||
json['hubName'] = nativeToJson<String>(hubName);
|
||||
return json;
|
||||
}
|
||||
|
||||
GetApplicationByStaffShiftAndRoleApplicationsShiftOrderTeamHub({
|
||||
required this.address,
|
||||
this.placeId,
|
||||
required this.hubName,
|
||||
});
|
||||
}
|
||||
|
||||
@immutable
|
||||
class GetApplicationByStaffShiftAndRoleApplicationsShiftOrderBusiness {
|
||||
final String id;
|
||||
final String businessName;
|
||||
final String? email;
|
||||
final String? contactName;
|
||||
final String? companyLogoUrl;
|
||||
GetApplicationByStaffShiftAndRoleApplicationsShiftOrderBusiness.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
businessName = nativeFromJson<String>(json['businessName']),
|
||||
email = json['email'] == null ? null : nativeFromJson<String>(json['email']),
|
||||
contactName = json['contactName'] == null ? null : nativeFromJson<String>(json['contactName']),
|
||||
companyLogoUrl = json['companyLogoUrl'] == null ? null : nativeFromJson<String>(json['companyLogoUrl']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if(other.runtimeType != runtimeType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final GetApplicationByStaffShiftAndRoleApplicationsShiftOrderBusiness otherTyped = other as GetApplicationByStaffShiftAndRoleApplicationsShiftOrderBusiness;
|
||||
return id == otherTyped.id &&
|
||||
businessName == otherTyped.businessName &&
|
||||
email == otherTyped.email &&
|
||||
contactName == otherTyped.contactName &&
|
||||
companyLogoUrl == otherTyped.companyLogoUrl;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => Object.hashAll([id.hashCode, businessName.hashCode, email.hashCode, contactName.hashCode, companyLogoUrl.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
json['id'] = nativeToJson<String>(id);
|
||||
json['businessName'] = nativeToJson<String>(businessName);
|
||||
if (email != null) {
|
||||
json['email'] = nativeToJson<String?>(email);
|
||||
}
|
||||
if (contactName != null) {
|
||||
json['contactName'] = nativeToJson<String?>(contactName);
|
||||
}
|
||||
if (companyLogoUrl != null) {
|
||||
json['companyLogoUrl'] = nativeToJson<String?>(companyLogoUrl);
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
GetApplicationByStaffShiftAndRoleApplicationsShiftOrderBusiness({
|
||||
required this.id,
|
||||
required this.businessName,
|
||||
this.email,
|
||||
this.contactName,
|
||||
this.companyLogoUrl,
|
||||
});
|
||||
}
|
||||
|
||||
@immutable
|
||||
class GetApplicationByStaffShiftAndRoleApplicationsShiftOrderVendor {
|
||||
final String id;
|
||||
final String companyName;
|
||||
GetApplicationByStaffShiftAndRoleApplicationsShiftOrderVendor.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
companyName = nativeFromJson<String>(json['companyName']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if(other.runtimeType != runtimeType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final GetApplicationByStaffShiftAndRoleApplicationsShiftOrderVendor otherTyped = other as GetApplicationByStaffShiftAndRoleApplicationsShiftOrderVendor;
|
||||
return id == otherTyped.id &&
|
||||
companyName == otherTyped.companyName;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => Object.hashAll([id.hashCode, companyName.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
json['id'] = nativeToJson<String>(id);
|
||||
json['companyName'] = nativeToJson<String>(companyName);
|
||||
return json;
|
||||
}
|
||||
|
||||
GetApplicationByStaffShiftAndRoleApplicationsShiftOrderVendor({
|
||||
required this.id,
|
||||
required this.companyName,
|
||||
});
|
||||
}
|
||||
|
||||
@immutable
|
||||
class GetApplicationByStaffShiftAndRoleApplicationsShiftRole {
|
||||
final String id;
|
||||
final String roleId;
|
||||
final int count;
|
||||
final int? assigned;
|
||||
final Timestamp? startTime;
|
||||
final Timestamp? endTime;
|
||||
final double? hours;
|
||||
final double? totalValue;
|
||||
final GetApplicationByStaffShiftAndRoleApplicationsShiftRoleRole role;
|
||||
GetApplicationByStaffShiftAndRoleApplicationsShiftRole.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
roleId = nativeFromJson<String>(json['roleId']),
|
||||
count = nativeFromJson<int>(json['count']),
|
||||
assigned = json['assigned'] == null ? null : nativeFromJson<int>(json['assigned']),
|
||||
startTime = json['startTime'] == null ? null : Timestamp.fromJson(json['startTime']),
|
||||
endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']),
|
||||
hours = json['hours'] == null ? null : nativeFromJson<double>(json['hours']),
|
||||
totalValue = json['totalValue'] == null ? null : nativeFromJson<double>(json['totalValue']),
|
||||
role = GetApplicationByStaffShiftAndRoleApplicationsShiftRoleRole.fromJson(json['role']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if(other.runtimeType != runtimeType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final GetApplicationByStaffShiftAndRoleApplicationsShiftRole otherTyped = other as GetApplicationByStaffShiftAndRoleApplicationsShiftRole;
|
||||
return id == otherTyped.id &&
|
||||
roleId == otherTyped.roleId &&
|
||||
count == otherTyped.count &&
|
||||
assigned == otherTyped.assigned &&
|
||||
startTime == otherTyped.startTime &&
|
||||
endTime == otherTyped.endTime &&
|
||||
hours == otherTyped.hours &&
|
||||
totalValue == otherTyped.totalValue &&
|
||||
role == otherTyped.role;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => Object.hashAll([id.hashCode, roleId.hashCode, count.hashCode, assigned.hashCode, startTime.hashCode, endTime.hashCode, hours.hashCode, totalValue.hashCode, role.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
json['id'] = nativeToJson<String>(id);
|
||||
json['roleId'] = nativeToJson<String>(roleId);
|
||||
json['count'] = nativeToJson<int>(count);
|
||||
if (assigned != null) {
|
||||
json['assigned'] = nativeToJson<int?>(assigned);
|
||||
}
|
||||
if (startTime != null) {
|
||||
json['startTime'] = startTime!.toJson();
|
||||
}
|
||||
if (endTime != null) {
|
||||
json['endTime'] = endTime!.toJson();
|
||||
}
|
||||
if (hours != null) {
|
||||
json['hours'] = nativeToJson<double?>(hours);
|
||||
}
|
||||
if (totalValue != null) {
|
||||
json['totalValue'] = nativeToJson<double?>(totalValue);
|
||||
}
|
||||
json['role'] = role.toJson();
|
||||
return json;
|
||||
}
|
||||
|
||||
GetApplicationByStaffShiftAndRoleApplicationsShiftRole({
|
||||
required this.id,
|
||||
required this.roleId,
|
||||
required this.count,
|
||||
this.assigned,
|
||||
this.startTime,
|
||||
this.endTime,
|
||||
this.hours,
|
||||
this.totalValue,
|
||||
required this.role,
|
||||
});
|
||||
}
|
||||
|
||||
@immutable
|
||||
class GetApplicationByStaffShiftAndRoleApplicationsShiftRoleRole {
|
||||
final String id;
|
||||
final String name;
|
||||
final double costPerHour;
|
||||
GetApplicationByStaffShiftAndRoleApplicationsShiftRoleRole.fromJson(dynamic json):
|
||||
|
||||
id = nativeFromJson<String>(json['id']),
|
||||
name = nativeFromJson<String>(json['name']),
|
||||
costPerHour = nativeFromJson<double>(json['costPerHour']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if(other.runtimeType != runtimeType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final GetApplicationByStaffShiftAndRoleApplicationsShiftRoleRole otherTyped = other as GetApplicationByStaffShiftAndRoleApplicationsShiftRoleRole;
|
||||
return id == otherTyped.id &&
|
||||
name == otherTyped.name &&
|
||||
costPerHour == otherTyped.costPerHour;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => Object.hashAll([id.hashCode, name.hashCode, costPerHour.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
json['id'] = nativeToJson<String>(id);
|
||||
json['name'] = nativeToJson<String>(name);
|
||||
json['costPerHour'] = nativeToJson<double>(costPerHour);
|
||||
return json;
|
||||
}
|
||||
|
||||
GetApplicationByStaffShiftAndRoleApplicationsShiftRoleRole({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.costPerHour,
|
||||
});
|
||||
}
|
||||
|
||||
@immutable
|
||||
class GetApplicationByStaffShiftAndRoleData {
|
||||
final List<GetApplicationByStaffShiftAndRoleApplications> applications;
|
||||
GetApplicationByStaffShiftAndRoleData.fromJson(dynamic json):
|
||||
|
||||
applications = (json['applications'] as List<dynamic>)
|
||||
.map((e) => GetApplicationByStaffShiftAndRoleApplications.fromJson(e))
|
||||
.toList();
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
if(identical(this, other)) {
|
||||
return true;
|
||||
}
|
||||
if(other.runtimeType != runtimeType) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final GetApplicationByStaffShiftAndRoleData otherTyped = other as GetApplicationByStaffShiftAndRoleData;
|
||||
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;
|
||||
}
|
||||
|
||||
GetApplicationByStaffShiftAndRoleData({
|
||||
required this.applications,
|
||||
});
|
||||
}
|
||||
|
||||
@immutable
|
||||
class GetApplicationByStaffShiftAndRoleVariables {
|
||||
final String staffId;
|
||||
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.')
|
||||
GetApplicationByStaffShiftAndRoleVariables.fromJson(Map<String, dynamic> json):
|
||||
|
||||
staffId = nativeFromJson<String>(json['staffId']),
|
||||
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 GetApplicationByStaffShiftAndRoleVariables otherTyped = other as GetApplicationByStaffShiftAndRoleVariables;
|
||||
return staffId == otherTyped.staffId &&
|
||||
shiftId == otherTyped.shiftId &&
|
||||
roleId == otherTyped.roleId &&
|
||||
offset == otherTyped.offset &&
|
||||
limit == otherTyped.limit;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => Object.hashAll([staffId.hashCode, shiftId.hashCode, roleId.hashCode, offset.hashCode, limit.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
Map<String, dynamic> json = {};
|
||||
json['staffId'] = nativeToJson<String>(staffId);
|
||||
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;
|
||||
}
|
||||
|
||||
GetApplicationByStaffShiftAndRoleVariables({
|
||||
required this.staffId,
|
||||
required this.shiftId,
|
||||
required this.roleId,
|
||||
required this.offset,
|
||||
required this.limit,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -142,6 +142,8 @@ class GetApplicationsByStaffIdApplicationsShift {
|
||||
final Timestamp? endTime;
|
||||
final String? location;
|
||||
final EnumValue<ShiftStatus>? status;
|
||||
final int? durationDays;
|
||||
final String? description;
|
||||
final GetApplicationsByStaffIdApplicationsShiftOrder order;
|
||||
GetApplicationsByStaffIdApplicationsShift.fromJson(dynamic json):
|
||||
|
||||
@@ -152,6 +154,8 @@ class GetApplicationsByStaffIdApplicationsShift {
|
||||
endTime = json['endTime'] == null ? null : Timestamp.fromJson(json['endTime']),
|
||||
location = json['location'] == null ? null : nativeFromJson<String>(json['location']),
|
||||
status = json['status'] == null ? null : shiftStatusDeserializer(json['status']),
|
||||
durationDays = json['durationDays'] == null ? null : nativeFromJson<int>(json['durationDays']),
|
||||
description = json['description'] == null ? null : nativeFromJson<String>(json['description']),
|
||||
order = GetApplicationsByStaffIdApplicationsShiftOrder.fromJson(json['order']);
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
@@ -170,11 +174,13 @@ class GetApplicationsByStaffIdApplicationsShift {
|
||||
endTime == otherTyped.endTime &&
|
||||
location == otherTyped.location &&
|
||||
status == otherTyped.status &&
|
||||
durationDays == otherTyped.durationDays &&
|
||||
description == otherTyped.description &&
|
||||
order == otherTyped.order;
|
||||
|
||||
}
|
||||
@override
|
||||
int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, location.hashCode, status.hashCode, order.hashCode]);
|
||||
int get hashCode => Object.hashAll([id.hashCode, title.hashCode, date.hashCode, startTime.hashCode, endTime.hashCode, location.hashCode, status.hashCode, durationDays.hashCode, description.hashCode, order.hashCode]);
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -198,6 +204,12 @@ class GetApplicationsByStaffIdApplicationsShift {
|
||||
shiftStatusSerializer(status!)
|
||||
;
|
||||
}
|
||||
if (durationDays != null) {
|
||||
json['durationDays'] = nativeToJson<int?>(durationDays);
|
||||
}
|
||||
if (description != null) {
|
||||
json['description'] = nativeToJson<String?>(description);
|
||||
}
|
||||
json['order'] = order.toJson();
|
||||
return json;
|
||||
}
|
||||
@@ -210,6 +222,8 @@ class GetApplicationsByStaffIdApplicationsShift {
|
||||
this.endTime,
|
||||
this.location,
|
||||
this.status,
|
||||
this.durationDays,
|
||||
this.description,
|
||||
required this.order,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user