Offline Support
This commit is contained in:
@@ -0,0 +1,635 @@
|
||||
// GENERATED CODE DO NOT EDIT
|
||||
part of '../brick.g.dart';
|
||||
|
||||
Future<ItServiceRequest> _$ItServiceRequestFromSupabase(
|
||||
Map<String, dynamic> data, {
|
||||
required SupabaseProvider provider,
|
||||
OfflineFirstWithSupabaseRepository? repository,
|
||||
}) async {
|
||||
return ItServiceRequest(
|
||||
id: data['id'] as String,
|
||||
requestNumber: data['request_number'] == null
|
||||
? null
|
||||
: data['request_number'] as String?,
|
||||
services: data['services'].toList().cast<String>(),
|
||||
servicesOther: data['services_other'] == null
|
||||
? null
|
||||
: data['services_other'] as String?,
|
||||
eventName: data['event_name'] as String,
|
||||
eventDetails: data['event_details'] == null
|
||||
? null
|
||||
: data['event_details'] as String?,
|
||||
eventDate: data['event_date'] == null
|
||||
? null
|
||||
: data['event_date'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['event_date'] as String),
|
||||
eventEndDate: data['event_end_date'] == null
|
||||
? null
|
||||
: data['event_end_date'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['event_end_date'] as String),
|
||||
dryRunDate: data['dry_run_date'] == null
|
||||
? null
|
||||
: data['dry_run_date'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['dry_run_date'] as String),
|
||||
dryRunEndDate: data['dry_run_end_date'] == null
|
||||
? null
|
||||
: data['dry_run_end_date'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['dry_run_end_date'] as String),
|
||||
contactPerson: data['contact_person'] == null
|
||||
? null
|
||||
: data['contact_person'] as String?,
|
||||
contactNumber: data['contact_number'] == null
|
||||
? null
|
||||
: data['contact_number'] as String?,
|
||||
remarks: data['remarks'] == null ? null : data['remarks'] as String?,
|
||||
officeId: data['office_id'] == null ? null : data['office_id'] as String?,
|
||||
requestedBy: data['requested_by'] == null
|
||||
? null
|
||||
: data['requested_by'] as String?,
|
||||
requestedByUserId: data['requested_by_user_id'] == null
|
||||
? null
|
||||
: data['requested_by_user_id'] as String?,
|
||||
approvedBy: data['approved_by'] == null
|
||||
? null
|
||||
: data['approved_by'] as String?,
|
||||
approvedByUserId: data['approved_by_user_id'] == null
|
||||
? null
|
||||
: data['approved_by_user_id'] as String?,
|
||||
approvedAt: data['approved_at'] == null
|
||||
? null
|
||||
: data['approved_at'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['approved_at'] as String),
|
||||
status: data['status'] as String,
|
||||
outsidePremiseAllowed: data['outside_premise_allowed'] as bool,
|
||||
cancellationReason: data['cancellation_reason'] == null
|
||||
? null
|
||||
: data['cancellation_reason'] as String?,
|
||||
cancelledAt: data['cancelled_at'] == null
|
||||
? null
|
||||
: data['cancelled_at'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['cancelled_at'] as String),
|
||||
creatorId: data['creator_id'] == null
|
||||
? null
|
||||
: data['creator_id'] as String?,
|
||||
createdAt: DateTime.parse(data['created_at'] as String),
|
||||
updatedAt: DateTime.parse(data['updated_at'] as String),
|
||||
completedAt: data['completed_at'] == null
|
||||
? null
|
||||
: data['completed_at'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['completed_at'] as String),
|
||||
dateTimeReceived: data['date_time_received'] == null
|
||||
? null
|
||||
: data['date_time_received'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['date_time_received'] as String),
|
||||
dateTimeChecked: data['date_time_checked'] == null
|
||||
? null
|
||||
: data['date_time_checked'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['date_time_checked'] as String),
|
||||
);
|
||||
}
|
||||
|
||||
Future<Map<String, dynamic>> _$ItServiceRequestToSupabase(
|
||||
ItServiceRequest instance, {
|
||||
required SupabaseProvider provider,
|
||||
OfflineFirstWithSupabaseRepository? repository,
|
||||
}) async {
|
||||
return {
|
||||
'id': instance.id,
|
||||
'request_number': instance.requestNumber,
|
||||
'services': instance.services,
|
||||
'services_other': instance.servicesOther,
|
||||
'event_name': instance.eventName,
|
||||
'event_details': instance.eventDetails,
|
||||
'event_date': instance.eventDate?.toIso8601String(),
|
||||
'event_end_date': instance.eventEndDate?.toIso8601String(),
|
||||
'dry_run_date': instance.dryRunDate?.toIso8601String(),
|
||||
'dry_run_end_date': instance.dryRunEndDate?.toIso8601String(),
|
||||
'contact_person': instance.contactPerson,
|
||||
'contact_number': instance.contactNumber,
|
||||
'remarks': instance.remarks,
|
||||
'office_id': instance.officeId,
|
||||
'requested_by': instance.requestedBy,
|
||||
'requested_by_user_id': instance.requestedByUserId,
|
||||
'approved_by': instance.approvedBy,
|
||||
'approved_by_user_id': instance.approvedByUserId,
|
||||
'approved_at': instance.approvedAt?.toIso8601String(),
|
||||
'status': instance.status,
|
||||
'outside_premise_allowed': instance.outsidePremiseAllowed,
|
||||
'cancellation_reason': instance.cancellationReason,
|
||||
'cancelled_at': instance.cancelledAt?.toIso8601String(),
|
||||
'creator_id': instance.creatorId,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'completed_at': instance.completedAt?.toIso8601String(),
|
||||
'date_time_received': instance.dateTimeReceived?.toIso8601String(),
|
||||
'date_time_checked': instance.dateTimeChecked?.toIso8601String(),
|
||||
};
|
||||
}
|
||||
|
||||
Future<ItServiceRequest> _$ItServiceRequestFromSqlite(
|
||||
Map<String, dynamic> data, {
|
||||
required SqliteProvider provider,
|
||||
OfflineFirstWithSupabaseRepository? repository,
|
||||
}) async {
|
||||
return ItServiceRequest(
|
||||
id: data['id'] as String,
|
||||
requestNumber: data['request_number'] == null
|
||||
? null
|
||||
: data['request_number'] as String?,
|
||||
services: jsonDecode(data['services']).toList().cast<String>(),
|
||||
servicesOther: data['services_other'] == null
|
||||
? null
|
||||
: data['services_other'] as String?,
|
||||
eventName: data['event_name'] as String,
|
||||
eventDetails: data['event_details'] == null
|
||||
? null
|
||||
: data['event_details'] as String?,
|
||||
eventDate: data['event_date'] == null
|
||||
? null
|
||||
: data['event_date'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['event_date'] as String),
|
||||
eventEndDate: data['event_end_date'] == null
|
||||
? null
|
||||
: data['event_end_date'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['event_end_date'] as String),
|
||||
dryRunDate: data['dry_run_date'] == null
|
||||
? null
|
||||
: data['dry_run_date'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['dry_run_date'] as String),
|
||||
dryRunEndDate: data['dry_run_end_date'] == null
|
||||
? null
|
||||
: data['dry_run_end_date'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['dry_run_end_date'] as String),
|
||||
contactPerson: data['contact_person'] == null
|
||||
? null
|
||||
: data['contact_person'] as String?,
|
||||
contactNumber: data['contact_number'] == null
|
||||
? null
|
||||
: data['contact_number'] as String?,
|
||||
remarks: data['remarks'] == null ? null : data['remarks'] as String?,
|
||||
officeId: data['office_id'] == null ? null : data['office_id'] as String?,
|
||||
requestedBy: data['requested_by'] == null
|
||||
? null
|
||||
: data['requested_by'] as String?,
|
||||
requestedByUserId: data['requested_by_user_id'] == null
|
||||
? null
|
||||
: data['requested_by_user_id'] as String?,
|
||||
approvedBy: data['approved_by'] == null
|
||||
? null
|
||||
: data['approved_by'] as String?,
|
||||
approvedByUserId: data['approved_by_user_id'] == null
|
||||
? null
|
||||
: data['approved_by_user_id'] as String?,
|
||||
approvedAt: data['approved_at'] == null
|
||||
? null
|
||||
: data['approved_at'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['approved_at'] as String),
|
||||
status: data['status'] as String,
|
||||
outsidePremiseAllowed: data['outside_premise_allowed'] == 1,
|
||||
cancellationReason: data['cancellation_reason'] == null
|
||||
? null
|
||||
: data['cancellation_reason'] as String?,
|
||||
cancelledAt: data['cancelled_at'] == null
|
||||
? null
|
||||
: data['cancelled_at'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['cancelled_at'] as String),
|
||||
creatorId: data['creator_id'] == null
|
||||
? null
|
||||
: data['creator_id'] as String?,
|
||||
createdAt: DateTime.parse(data['created_at'] as String),
|
||||
updatedAt: DateTime.parse(data['updated_at'] as String),
|
||||
completedAt: data['completed_at'] == null
|
||||
? null
|
||||
: data['completed_at'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['completed_at'] as String),
|
||||
dateTimeReceived: data['date_time_received'] == null
|
||||
? null
|
||||
: data['date_time_received'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['date_time_received'] as String),
|
||||
dateTimeChecked: data['date_time_checked'] == null
|
||||
? null
|
||||
: data['date_time_checked'] == null
|
||||
? null
|
||||
: DateTime.tryParse(data['date_time_checked'] as String),
|
||||
)..primaryKey = data['_brick_id'] as int;
|
||||
}
|
||||
|
||||
Future<Map<String, dynamic>> _$ItServiceRequestToSqlite(
|
||||
ItServiceRequest instance, {
|
||||
required SqliteProvider provider,
|
||||
OfflineFirstWithSupabaseRepository? repository,
|
||||
}) async {
|
||||
return {
|
||||
'id': instance.id,
|
||||
'request_number': instance.requestNumber,
|
||||
'services': jsonEncode(instance.services),
|
||||
'services_other': instance.servicesOther,
|
||||
'event_name': instance.eventName,
|
||||
'event_details': instance.eventDetails,
|
||||
'event_date': instance.eventDate?.toIso8601String(),
|
||||
'event_end_date': instance.eventEndDate?.toIso8601String(),
|
||||
'dry_run_date': instance.dryRunDate?.toIso8601String(),
|
||||
'dry_run_end_date': instance.dryRunEndDate?.toIso8601String(),
|
||||
'contact_person': instance.contactPerson,
|
||||
'contact_number': instance.contactNumber,
|
||||
'remarks': instance.remarks,
|
||||
'office_id': instance.officeId,
|
||||
'requested_by': instance.requestedBy,
|
||||
'requested_by_user_id': instance.requestedByUserId,
|
||||
'approved_by': instance.approvedBy,
|
||||
'approved_by_user_id': instance.approvedByUserId,
|
||||
'approved_at': instance.approvedAt?.toIso8601String(),
|
||||
'status': instance.status,
|
||||
'outside_premise_allowed': instance.outsidePremiseAllowed ? 1 : 0,
|
||||
'cancellation_reason': instance.cancellationReason,
|
||||
'cancelled_at': instance.cancelledAt?.toIso8601String(),
|
||||
'creator_id': instance.creatorId,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'completed_at': instance.completedAt?.toIso8601String(),
|
||||
'date_time_received': instance.dateTimeReceived?.toIso8601String(),
|
||||
'date_time_checked': instance.dateTimeChecked?.toIso8601String(),
|
||||
};
|
||||
}
|
||||
|
||||
/// Construct a [ItServiceRequest]
|
||||
class ItServiceRequestAdapter
|
||||
extends OfflineFirstWithSupabaseAdapter<ItServiceRequest> {
|
||||
ItServiceRequestAdapter();
|
||||
|
||||
@override
|
||||
final supabaseTableName = 'it_service_requests';
|
||||
@override
|
||||
final defaultToNull = true;
|
||||
@override
|
||||
final fieldsToSupabaseColumns = {
|
||||
'id': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'id',
|
||||
),
|
||||
'requestNumber': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'request_number',
|
||||
),
|
||||
'services': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'services',
|
||||
),
|
||||
'servicesOther': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'services_other',
|
||||
),
|
||||
'eventName': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'event_name',
|
||||
),
|
||||
'eventDetails': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'event_details',
|
||||
),
|
||||
'eventDate': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'event_date',
|
||||
),
|
||||
'eventEndDate': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'event_end_date',
|
||||
),
|
||||
'dryRunDate': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'dry_run_date',
|
||||
),
|
||||
'dryRunEndDate': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'dry_run_end_date',
|
||||
),
|
||||
'contactPerson': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'contact_person',
|
||||
),
|
||||
'contactNumber': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'contact_number',
|
||||
),
|
||||
'remarks': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'remarks',
|
||||
),
|
||||
'officeId': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'office_id',
|
||||
),
|
||||
'requestedBy': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'requested_by',
|
||||
),
|
||||
'requestedByUserId': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'requested_by_user_id',
|
||||
),
|
||||
'approvedBy': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'approved_by',
|
||||
),
|
||||
'approvedByUserId': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'approved_by_user_id',
|
||||
),
|
||||
'approvedAt': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'approved_at',
|
||||
),
|
||||
'status': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'status',
|
||||
),
|
||||
'outsidePremiseAllowed': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'outside_premise_allowed',
|
||||
),
|
||||
'cancellationReason': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'cancellation_reason',
|
||||
),
|
||||
'cancelledAt': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'cancelled_at',
|
||||
),
|
||||
'creatorId': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'creator_id',
|
||||
),
|
||||
'createdAt': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'created_at',
|
||||
),
|
||||
'updatedAt': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'updated_at',
|
||||
),
|
||||
'completedAt': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'completed_at',
|
||||
),
|
||||
'dateTimeReceived': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'date_time_received',
|
||||
),
|
||||
'dateTimeChecked': const RuntimeSupabaseColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'date_time_checked',
|
||||
),
|
||||
};
|
||||
@override
|
||||
final ignoreDuplicates = false;
|
||||
@override
|
||||
final uniqueFields = {};
|
||||
@override
|
||||
final Map<String, RuntimeSqliteColumnDefinition> fieldsToSqliteColumns = {
|
||||
'primaryKey': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: '_brick_id',
|
||||
iterable: false,
|
||||
type: int,
|
||||
),
|
||||
'id': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'id',
|
||||
iterable: false,
|
||||
type: String,
|
||||
),
|
||||
'requestNumber': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'request_number',
|
||||
iterable: false,
|
||||
type: String,
|
||||
),
|
||||
'services': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'services',
|
||||
iterable: true,
|
||||
type: String,
|
||||
),
|
||||
'servicesOther': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'services_other',
|
||||
iterable: false,
|
||||
type: String,
|
||||
),
|
||||
'eventName': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'event_name',
|
||||
iterable: false,
|
||||
type: String,
|
||||
),
|
||||
'eventDetails': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'event_details',
|
||||
iterable: false,
|
||||
type: String,
|
||||
),
|
||||
'eventDate': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'event_date',
|
||||
iterable: false,
|
||||
type: DateTime,
|
||||
),
|
||||
'eventEndDate': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'event_end_date',
|
||||
iterable: false,
|
||||
type: DateTime,
|
||||
),
|
||||
'dryRunDate': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'dry_run_date',
|
||||
iterable: false,
|
||||
type: DateTime,
|
||||
),
|
||||
'dryRunEndDate': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'dry_run_end_date',
|
||||
iterable: false,
|
||||
type: DateTime,
|
||||
),
|
||||
'contactPerson': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'contact_person',
|
||||
iterable: false,
|
||||
type: String,
|
||||
),
|
||||
'contactNumber': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'contact_number',
|
||||
iterable: false,
|
||||
type: String,
|
||||
),
|
||||
'remarks': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'remarks',
|
||||
iterable: false,
|
||||
type: String,
|
||||
),
|
||||
'officeId': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'office_id',
|
||||
iterable: false,
|
||||
type: String,
|
||||
),
|
||||
'requestedBy': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'requested_by',
|
||||
iterable: false,
|
||||
type: String,
|
||||
),
|
||||
'requestedByUserId': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'requested_by_user_id',
|
||||
iterable: false,
|
||||
type: String,
|
||||
),
|
||||
'approvedBy': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'approved_by',
|
||||
iterable: false,
|
||||
type: String,
|
||||
),
|
||||
'approvedByUserId': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'approved_by_user_id',
|
||||
iterable: false,
|
||||
type: String,
|
||||
),
|
||||
'approvedAt': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'approved_at',
|
||||
iterable: false,
|
||||
type: DateTime,
|
||||
),
|
||||
'status': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'status',
|
||||
iterable: false,
|
||||
type: String,
|
||||
),
|
||||
'outsidePremiseAllowed': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'outside_premise_allowed',
|
||||
iterable: false,
|
||||
type: bool,
|
||||
),
|
||||
'cancellationReason': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'cancellation_reason',
|
||||
iterable: false,
|
||||
type: String,
|
||||
),
|
||||
'cancelledAt': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'cancelled_at',
|
||||
iterable: false,
|
||||
type: DateTime,
|
||||
),
|
||||
'creatorId': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'creator_id',
|
||||
iterable: false,
|
||||
type: String,
|
||||
),
|
||||
'createdAt': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'created_at',
|
||||
iterable: false,
|
||||
type: DateTime,
|
||||
),
|
||||
'updatedAt': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'updated_at',
|
||||
iterable: false,
|
||||
type: DateTime,
|
||||
),
|
||||
'completedAt': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'completed_at',
|
||||
iterable: false,
|
||||
type: DateTime,
|
||||
),
|
||||
'dateTimeReceived': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'date_time_received',
|
||||
iterable: false,
|
||||
type: DateTime,
|
||||
),
|
||||
'dateTimeChecked': const RuntimeSqliteColumnDefinition(
|
||||
association: false,
|
||||
columnName: 'date_time_checked',
|
||||
iterable: false,
|
||||
type: DateTime,
|
||||
),
|
||||
};
|
||||
@override
|
||||
Future<int?> primaryKeyByUniqueColumns(
|
||||
ItServiceRequest instance,
|
||||
DatabaseExecutor executor,
|
||||
) async => instance.primaryKey;
|
||||
@override
|
||||
final String tableName = 'ItServiceRequest';
|
||||
|
||||
@override
|
||||
Future<ItServiceRequest> fromSupabase(
|
||||
Map<String, dynamic> input, {
|
||||
required provider,
|
||||
covariant OfflineFirstWithSupabaseRepository? repository,
|
||||
}) async => await _$ItServiceRequestFromSupabase(
|
||||
input,
|
||||
provider: provider,
|
||||
repository: repository,
|
||||
);
|
||||
@override
|
||||
Future<Map<String, dynamic>> toSupabase(
|
||||
ItServiceRequest input, {
|
||||
required provider,
|
||||
covariant OfflineFirstWithSupabaseRepository? repository,
|
||||
}) async => await _$ItServiceRequestToSupabase(
|
||||
input,
|
||||
provider: provider,
|
||||
repository: repository,
|
||||
);
|
||||
@override
|
||||
Future<ItServiceRequest> fromSqlite(
|
||||
Map<String, dynamic> input, {
|
||||
required provider,
|
||||
covariant OfflineFirstWithSupabaseRepository? repository,
|
||||
}) async => await _$ItServiceRequestFromSqlite(
|
||||
input,
|
||||
provider: provider,
|
||||
repository: repository,
|
||||
);
|
||||
@override
|
||||
Future<Map<String, dynamic>> toSqlite(
|
||||
ItServiceRequest input, {
|
||||
required provider,
|
||||
covariant OfflineFirstWithSupabaseRepository? repository,
|
||||
}) async => await _$ItServiceRequestToSqlite(
|
||||
input,
|
||||
provider: provider,
|
||||
repository: repository,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user