1. Import
This commit is contained in:
commit
cb4525a774
165 files changed
+14763
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:stadtbote/model/device_object.dart';
|
||||
|
||||
part 'bootstrap_request.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class BootstrapRequest {
|
||||
late String app;
|
||||
late int ver;
|
||||
late String mqttClientId;
|
||||
|
||||
@JsonKey(name: 'device')
|
||||
late DeviceObject deviceObject;
|
||||
|
||||
BootstrapRequest();
|
||||
|
||||
factory BootstrapRequest.fromJson(Map<String, dynamic> json) => _$BootstrapRequestFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$BootstrapRequestToJson(this);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'bootstrap_request.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
BootstrapRequest _$BootstrapRequestFromJson(Map<String, dynamic> json) =>
|
||||
BootstrapRequest()
|
||||
..app = json['app'] as String
|
||||
..ver = json['ver'] as int
|
||||
..mqttClientId = json['mqttClientId'] as String
|
||||
..deviceObject =
|
||||
DeviceObject.fromJson(json['device'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$BootstrapRequestToJson(BootstrapRequest instance) =>
|
||||
<String, dynamic>{
|
||||
'app': instance.app,
|
||||
'ver': instance.ver,
|
||||
'mqttClientId': instance.mqttClientId,
|
||||
'device': instance.deviceObject,
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:stadtbote/model/bootstrap_response_topics.dart';
|
||||
import 'package:stadtbote/model/device_object.dart';
|
||||
|
||||
part 'bootstrap_response_config.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class BootstrapResponseConfig
|
||||
{
|
||||
late String broker;
|
||||
|
||||
late BootstrapResponseTopics topics;
|
||||
|
||||
BootstrapResponseConfig();
|
||||
|
||||
factory BootstrapResponseConfig.fromJson(Map<String, dynamic> json) => _$BootstrapResponseConfigFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$BootstrapResponseConfigToJson(this);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'bootstrap_response_config.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
BootstrapResponseConfig _$BootstrapResponseConfigFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
BootstrapResponseConfig()
|
||||
..broker = json['broker'] as String
|
||||
..topics = BootstrapResponseTopics.fromJson(
|
||||
json['topics'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$BootstrapResponseConfigToJson(
|
||||
BootstrapResponseConfig instance) =>
|
||||
<String, dynamic>{
|
||||
'broker': instance.broker,
|
||||
'topics': instance.topics,
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:stadtbote/model/bootstrap_response_config.dart';
|
||||
import 'package:stadtbote/model/device_object.dart';
|
||||
|
||||
part 'bootstrap_response_payload.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class BootstrapResponsePayload
|
||||
{
|
||||
late BootstrapResponseConfig config;
|
||||
|
||||
BootstrapResponsePayload();
|
||||
|
||||
factory BootstrapResponsePayload.fromJson(Map<String, dynamic> json) => _$BootstrapResponsePayloadFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$BootstrapResponsePayloadToJson(this);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'bootstrap_response_payload.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
BootstrapResponsePayload _$BootstrapResponsePayloadFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
BootstrapResponsePayload()
|
||||
..config = BootstrapResponseConfig.fromJson(
|
||||
json['config'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$BootstrapResponsePayloadToJson(
|
||||
BootstrapResponsePayload instance) =>
|
||||
<String, dynamic>{
|
||||
'config': instance.config,
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:stadtbote/model/device_object.dart';
|
||||
|
||||
part 'bootstrap_response_topics.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class BootstrapResponseTopics
|
||||
{
|
||||
@JsonKey(name: 'to_server')
|
||||
late String toServer;
|
||||
|
||||
@JsonKey(name: 'from_server')
|
||||
late String fromServer;
|
||||
|
||||
BootstrapResponseTopics();
|
||||
|
||||
factory BootstrapResponseTopics.fromJson(Map<String, dynamic> json) => _$BootstrapResponseTopicsFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$BootstrapResponseTopicsToJson(this);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'bootstrap_response_topics.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
BootstrapResponseTopics _$BootstrapResponseTopicsFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
BootstrapResponseTopics()
|
||||
..toServer = json['to_server'] as String
|
||||
..fromServer = json['from_server'] as String;
|
||||
|
||||
Map<String, dynamic> _$BootstrapResponseTopicsToJson(
|
||||
BootstrapResponseTopics instance) =>
|
||||
<String, dynamic>{
|
||||
'to_server': instance.toServer,
|
||||
'from_server': instance.fromServer,
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'device_object.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class DeviceObject {
|
||||
late String model;
|
||||
late String manufacturer;
|
||||
late String os;
|
||||
late String osVer;
|
||||
|
||||
DeviceObject();
|
||||
|
||||
factory DeviceObject.fromJson(Map<String, dynamic> json) => _$DeviceObjectFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$DeviceObjectToJson(this);
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'device_object.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
DeviceObject _$DeviceObjectFromJson(Map<String, dynamic> json) => DeviceObject()
|
||||
..model = json['model'] as String
|
||||
..manufacturer = json['manufacturer'] as String
|
||||
..os = json['os'] as String
|
||||
..osVer = json['osVer'] as String;
|
||||
|
||||
Map<String, dynamic> _$DeviceObjectToJson(DeviceObject instance) =>
|
||||
<String, dynamic>{
|
||||
'model': instance.model,
|
||||
'manufacturer': instance.manufacturer,
|
||||
'os': instance.os,
|
||||
'osVer': instance.osVer,
|
||||
};
|
||||
@@ -0,0 +1,49 @@
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:stadtbote/model/job_tour.dart';
|
||||
import 'package:stadtbote/model/tour_position.dart';
|
||||
import 'package:stadtbote/model/tour_task.dart';
|
||||
|
||||
part 'job.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class JobsPayload {
|
||||
List<Job>? jobs;
|
||||
|
||||
JobsPayload({this.jobs});
|
||||
|
||||
factory JobsPayload.fromJson(Map<String, dynamic> json) => _$JobsPayloadFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$JobsPayloadToJson(this);
|
||||
}
|
||||
|
||||
@collection
|
||||
@JsonSerializable()
|
||||
class Job {
|
||||
late Id id;
|
||||
@JsonKey(name: 'ver')
|
||||
late int ver;
|
||||
@JsonKey(name: 'state')
|
||||
late int state;
|
||||
@JsonKey(name: 'cr_filter')
|
||||
late String? crFilter;
|
||||
@JsonKey(name: 'ordertime')
|
||||
late String ordertime;
|
||||
@JsonKey(name: 'offs_warn')
|
||||
late int offsWarn;
|
||||
@JsonKey(name: 'global')
|
||||
late bool global;
|
||||
@JsonKey(name: 'vht_id')
|
||||
late int vhtId;
|
||||
@JsonKey(name: 'rem')
|
||||
late List<String> rem;
|
||||
@JsonKey(name: 'tours')
|
||||
late List<JobTour> tours;
|
||||
|
||||
Job();
|
||||
|
||||
factory Job.fromJson(Map<String, dynamic> json) => _$JobFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$JobToJson(this);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,30 @@
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:stadtbote/model/tour_position.dart';
|
||||
import 'package:stadtbote/model/tour_task.dart';
|
||||
|
||||
part 'job_tour.g.dart';
|
||||
|
||||
@embedded
|
||||
@JsonSerializable()
|
||||
class JobTour {
|
||||
late int id;
|
||||
late int sort;
|
||||
late int state;
|
||||
late String mode;
|
||||
late String comp;
|
||||
late String person;
|
||||
late String phone;
|
||||
late String street;
|
||||
late String city;
|
||||
late String com;
|
||||
late TourPosition? pos;
|
||||
late List<String> rem;
|
||||
late List<TourTask> tasks;
|
||||
|
||||
JobTour();
|
||||
|
||||
factory JobTour.fromJson(Map<String, dynamic> json) => _$JobTourFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$JobTourToJson(this);
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,104 @@
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:stadtbote/model/short_poll_question.dart';
|
||||
|
||||
part 'short_poll.g.dart';
|
||||
|
||||
@collection
|
||||
class ShortPoll {
|
||||
late Id id;
|
||||
|
||||
late int type;
|
||||
|
||||
late String text;
|
||||
|
||||
late String title;
|
||||
|
||||
late int validFrom;
|
||||
|
||||
late int validTo;
|
||||
|
||||
late int? imageWidth;
|
||||
|
||||
late int? imageHeight;
|
||||
|
||||
late String? imageModified;
|
||||
|
||||
late bool? commentsAllowed;
|
||||
|
||||
late bool read = false;
|
||||
|
||||
late String? url;
|
||||
|
||||
late String? pdfName;
|
||||
|
||||
late bool voted;
|
||||
|
||||
late int numberOfVotes;
|
||||
|
||||
late List<ShortPollQuestion> questions;
|
||||
|
||||
ShortPoll({
|
||||
required this.id,
|
||||
required this.type,
|
||||
required this.text,
|
||||
required this.title,
|
||||
required this.validFrom,
|
||||
required this.validTo,
|
||||
this.imageWidth,
|
||||
this.imageHeight,
|
||||
this.imageModified,
|
||||
this.commentsAllowed,
|
||||
required this.read,
|
||||
this.url,
|
||||
this.pdfName,
|
||||
required this.voted,
|
||||
required this.numberOfVotes,
|
||||
required this.questions,
|
||||
});
|
||||
|
||||
/*factory ShortPoll.fromJson(Map<String, dynamic> json) {
|
||||
List<ShortPollQuestion> questions = [];
|
||||
|
||||
if (json["answers"] != null) {
|
||||
questions = List<ShortPollQuestion>.from(
|
||||
json["answers"].map((x) => ShortPollQuestion.fromJson(x)));
|
||||
}
|
||||
|
||||
return ShortPoll(
|
||||
id: json["id"],
|
||||
type: json["type"],
|
||||
text: json["text"],
|
||||
title: json["title"],
|
||||
validFrom: json["validFrom"],
|
||||
validTo: json["validTo"],
|
||||
imageWidth: json["imageWidth"],
|
||||
imageHeight: json["imageHeight"],
|
||||
imageModified: json["imageModified"],
|
||||
commentsAllowed: json["commentsAllowed"],
|
||||
read: json["read"],
|
||||
url: json["url"],
|
||||
pdfName: json["pdfName"],
|
||||
voted: json["voted"],
|
||||
numberOfVotes: json["numberOfVotes"],
|
||||
questions: questions,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"id": id,
|
||||
"type": type,
|
||||
"text": text,
|
||||
"title": title,
|
||||
"validFrom": validFrom,
|
||||
"validTo": validTo,
|
||||
"imageWidth": imageWidth,
|
||||
"imageHeight": imageHeight,
|
||||
"imageModified": imageModified,
|
||||
"commentsAllowed": commentsAllowed,
|
||||
"read": read,
|
||||
"url": url,
|
||||
"pdfName": pdfName,
|
||||
"voted": voted,
|
||||
"numberOfVotes": numberOfVotes,
|
||||
};*/
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,35 @@
|
||||
import 'package:isar/isar.dart';
|
||||
|
||||
part 'short_poll_question.g.dart';
|
||||
|
||||
@embedded
|
||||
class ShortPollQuestion {
|
||||
late int questionId;
|
||||
|
||||
late int shortPollId;
|
||||
|
||||
late String text;
|
||||
|
||||
/*@Ignore()
|
||||
late String imageName = "assets/radiobutton.png";
|
||||
|
||||
@Ignore()
|
||||
late bool selected = false;*/
|
||||
|
||||
ShortPollQuestion();
|
||||
|
||||
/*factory ShortPollQuestion.fromJson(Map<String, dynamic> json) {
|
||||
var shortPollQuestion = ShortPollQuestion();
|
||||
shortPollQuestion.questionId = json['id'];
|
||||
shortPollQuestion.shortPollId = json["shortPollId"];
|
||||
shortPollQuestion.text = json["text"];
|
||||
|
||||
return shortPollQuestion;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
"id": questionId,
|
||||
"short_poll_id": shortPollId,
|
||||
"text": text,
|
||||
};*/
|
||||
}
|
||||
@@ -0,0 +1,342 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'short_poll_question.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// IsarEmbeddedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
|
||||
|
||||
const ShortPollQuestionSchema = Schema(
|
||||
name: r'ShortPollQuestion',
|
||||
id: 899576032619711410,
|
||||
properties: {
|
||||
r'questionId': PropertySchema(
|
||||
id: 0,
|
||||
name: r'questionId',
|
||||
type: IsarType.long,
|
||||
),
|
||||
r'shortPollId': PropertySchema(
|
||||
id: 1,
|
||||
name: r'shortPollId',
|
||||
type: IsarType.long,
|
||||
),
|
||||
r'text': PropertySchema(
|
||||
id: 2,
|
||||
name: r'text',
|
||||
type: IsarType.string,
|
||||
)
|
||||
},
|
||||
estimateSize: _shortPollQuestionEstimateSize,
|
||||
serialize: _shortPollQuestionSerialize,
|
||||
deserialize: _shortPollQuestionDeserialize,
|
||||
deserializeProp: _shortPollQuestionDeserializeProp,
|
||||
);
|
||||
|
||||
int _shortPollQuestionEstimateSize(
|
||||
ShortPollQuestion object,
|
||||
List<int> offsets,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
var bytesCount = offsets.last;
|
||||
bytesCount += 3 + object.text.length * 3;
|
||||
return bytesCount;
|
||||
}
|
||||
|
||||
void _shortPollQuestionSerialize(
|
||||
ShortPollQuestion object,
|
||||
IsarWriter writer,
|
||||
List<int> offsets,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
writer.writeLong(offsets[0], object.questionId);
|
||||
writer.writeLong(offsets[1], object.shortPollId);
|
||||
writer.writeString(offsets[2], object.text);
|
||||
}
|
||||
|
||||
ShortPollQuestion _shortPollQuestionDeserialize(
|
||||
Id id,
|
||||
IsarReader reader,
|
||||
List<int> offsets,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
final object = ShortPollQuestion();
|
||||
object.questionId = reader.readLong(offsets[0]);
|
||||
object.shortPollId = reader.readLong(offsets[1]);
|
||||
object.text = reader.readString(offsets[2]);
|
||||
return object;
|
||||
}
|
||||
|
||||
P _shortPollQuestionDeserializeProp<P>(
|
||||
IsarReader reader,
|
||||
int propertyId,
|
||||
int offset,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
switch (propertyId) {
|
||||
case 0:
|
||||
return (reader.readLong(offset)) as P;
|
||||
case 1:
|
||||
return (reader.readLong(offset)) as P;
|
||||
case 2:
|
||||
return (reader.readString(offset)) as P;
|
||||
default:
|
||||
throw IsarError('Unknown property with id $propertyId');
|
||||
}
|
||||
}
|
||||
|
||||
extension ShortPollQuestionQueryFilter
|
||||
on QueryBuilder<ShortPollQuestion, ShortPollQuestion, QFilterCondition> {
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
questionIdEqualTo(int value) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'questionId',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
questionIdGreaterThan(
|
||||
int value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
include: include,
|
||||
property: r'questionId',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
questionIdLessThan(
|
||||
int value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.lessThan(
|
||||
include: include,
|
||||
property: r'questionId',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
questionIdBetween(
|
||||
int lower,
|
||||
int upper, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.between(
|
||||
property: r'questionId',
|
||||
lower: lower,
|
||||
includeLower: includeLower,
|
||||
upper: upper,
|
||||
includeUpper: includeUpper,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
shortPollIdEqualTo(int value) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'shortPollId',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
shortPollIdGreaterThan(
|
||||
int value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
include: include,
|
||||
property: r'shortPollId',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
shortPollIdLessThan(
|
||||
int value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.lessThan(
|
||||
include: include,
|
||||
property: r'shortPollId',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
shortPollIdBetween(
|
||||
int lower,
|
||||
int upper, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.between(
|
||||
property: r'shortPollId',
|
||||
lower: lower,
|
||||
includeLower: includeLower,
|
||||
upper: upper,
|
||||
includeUpper: includeUpper,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
textEqualTo(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'text',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
textGreaterThan(
|
||||
String value, {
|
||||
bool include = false,
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
include: include,
|
||||
property: r'text',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
textLessThan(
|
||||
String value, {
|
||||
bool include = false,
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.lessThan(
|
||||
include: include,
|
||||
property: r'text',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
textBetween(
|
||||
String lower,
|
||||
String upper, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.between(
|
||||
property: r'text',
|
||||
lower: lower,
|
||||
includeLower: includeLower,
|
||||
upper: upper,
|
||||
includeUpper: includeUpper,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
textStartsWith(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.startsWith(
|
||||
property: r'text',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
textEndsWith(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.endsWith(
|
||||
property: r'text',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
textContains(String value, {bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.contains(
|
||||
property: r'text',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
textMatches(String pattern, {bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.matches(
|
||||
property: r'text',
|
||||
wildcard: pattern,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
textIsEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'text',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<ShortPollQuestion, ShortPollQuestion, QAfterFilterCondition>
|
||||
textIsNotEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
property: r'text',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension ShortPollQuestionQueryObject
|
||||
on QueryBuilder<ShortPollQuestion, ShortPollQuestion, QFilterCondition> {}
|
||||
@@ -0,0 +1,31 @@
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'status.g.dart';
|
||||
|
||||
@collection
|
||||
@JsonSerializable()
|
||||
class Status {
|
||||
final Id id = 0;
|
||||
|
||||
@JsonKey(name: 'cust_id')
|
||||
int? custId;
|
||||
@JsonKey(name: 'hq_id')
|
||||
int? hqId;
|
||||
@JsonKey(name: 'usr_id')
|
||||
int? usrId;
|
||||
@JsonKey(name: 'cr_id')
|
||||
int? crId;
|
||||
@JsonKey(name: 'sid')
|
||||
String? sid;
|
||||
@JsonKey(name: 'vht_id')
|
||||
int? vhtId;
|
||||
@JsonKey(name: 'loc_zip')
|
||||
String? locZip;
|
||||
|
||||
Status({this.hqId, this.usrId, this.crId, this.sid, this.vhtId, this.locZip, this.custId});
|
||||
|
||||
factory Status.fromJson(Map<String, dynamic> json) => _$StatusFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$StatusToJson(this);
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,22 @@
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:stadtbote/model/tour_task.dart';
|
||||
|
||||
part 'task_info.g.dart';
|
||||
|
||||
@collection
|
||||
class TaskInfo {
|
||||
late Id id;
|
||||
|
||||
late int sId;
|
||||
|
||||
late String? additionalText;
|
||||
|
||||
late String? answer;
|
||||
|
||||
@ignore
|
||||
late TourTask task;
|
||||
|
||||
TaskInfo();
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,752 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'task_info.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// IsarCollectionGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
|
||||
|
||||
extension GetTaskInfoCollection on Isar {
|
||||
IsarCollection<TaskInfo> get taskInfos => this.collection();
|
||||
}
|
||||
|
||||
const TaskInfoSchema = CollectionSchema(
|
||||
name: r'TaskInfo',
|
||||
id: 3341968002652240051,
|
||||
properties: {
|
||||
r'additionalText': PropertySchema(
|
||||
id: 0,
|
||||
name: r'additionalText',
|
||||
type: IsarType.string,
|
||||
),
|
||||
r'answer': PropertySchema(
|
||||
id: 1,
|
||||
name: r'answer',
|
||||
type: IsarType.string,
|
||||
),
|
||||
r'sId': PropertySchema(
|
||||
id: 2,
|
||||
name: r'sId',
|
||||
type: IsarType.long,
|
||||
)
|
||||
},
|
||||
estimateSize: _taskInfoEstimateSize,
|
||||
serialize: _taskInfoSerialize,
|
||||
deserialize: _taskInfoDeserialize,
|
||||
deserializeProp: _taskInfoDeserializeProp,
|
||||
idName: r'id',
|
||||
indexes: {},
|
||||
links: {},
|
||||
embeddedSchemas: {},
|
||||
getId: _taskInfoGetId,
|
||||
getLinks: _taskInfoGetLinks,
|
||||
attach: _taskInfoAttach,
|
||||
version: '3.1.0+1',
|
||||
);
|
||||
|
||||
int _taskInfoEstimateSize(
|
||||
TaskInfo object,
|
||||
List<int> offsets,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
var bytesCount = offsets.last;
|
||||
{
|
||||
final value = object.additionalText;
|
||||
if (value != null) {
|
||||
bytesCount += 3 + value.length * 3;
|
||||
}
|
||||
}
|
||||
{
|
||||
final value = object.answer;
|
||||
if (value != null) {
|
||||
bytesCount += 3 + value.length * 3;
|
||||
}
|
||||
}
|
||||
return bytesCount;
|
||||
}
|
||||
|
||||
void _taskInfoSerialize(
|
||||
TaskInfo object,
|
||||
IsarWriter writer,
|
||||
List<int> offsets,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
writer.writeString(offsets[0], object.additionalText);
|
||||
writer.writeString(offsets[1], object.answer);
|
||||
writer.writeLong(offsets[2], object.sId);
|
||||
}
|
||||
|
||||
TaskInfo _taskInfoDeserialize(
|
||||
Id id,
|
||||
IsarReader reader,
|
||||
List<int> offsets,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
final object = TaskInfo();
|
||||
object.additionalText = reader.readStringOrNull(offsets[0]);
|
||||
object.answer = reader.readStringOrNull(offsets[1]);
|
||||
object.id = id;
|
||||
object.sId = reader.readLong(offsets[2]);
|
||||
return object;
|
||||
}
|
||||
|
||||
P _taskInfoDeserializeProp<P>(
|
||||
IsarReader reader,
|
||||
int propertyId,
|
||||
int offset,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
switch (propertyId) {
|
||||
case 0:
|
||||
return (reader.readStringOrNull(offset)) as P;
|
||||
case 1:
|
||||
return (reader.readStringOrNull(offset)) as P;
|
||||
case 2:
|
||||
return (reader.readLong(offset)) as P;
|
||||
default:
|
||||
throw IsarError('Unknown property with id $propertyId');
|
||||
}
|
||||
}
|
||||
|
||||
Id _taskInfoGetId(TaskInfo object) {
|
||||
return object.id;
|
||||
}
|
||||
|
||||
List<IsarLinkBase<dynamic>> _taskInfoGetLinks(TaskInfo object) {
|
||||
return [];
|
||||
}
|
||||
|
||||
void _taskInfoAttach(IsarCollection<dynamic> col, Id id, TaskInfo object) {
|
||||
object.id = id;
|
||||
}
|
||||
|
||||
extension TaskInfoQueryWhereSort on QueryBuilder<TaskInfo, TaskInfo, QWhere> {
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterWhere> anyId() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(const IdWhereClause.any());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension TaskInfoQueryWhere on QueryBuilder<TaskInfo, TaskInfo, QWhereClause> {
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterWhereClause> idEqualTo(Id id) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(IdWhereClause.between(
|
||||
lower: id,
|
||||
upper: id,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterWhereClause> idNotEqualTo(Id id) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
if (query.whereSort == Sort.asc) {
|
||||
return query
|
||||
.addWhereClause(
|
||||
IdWhereClause.lessThan(upper: id, includeUpper: false),
|
||||
)
|
||||
.addWhereClause(
|
||||
IdWhereClause.greaterThan(lower: id, includeLower: false),
|
||||
);
|
||||
} else {
|
||||
return query
|
||||
.addWhereClause(
|
||||
IdWhereClause.greaterThan(lower: id, includeLower: false),
|
||||
)
|
||||
.addWhereClause(
|
||||
IdWhereClause.lessThan(upper: id, includeUpper: false),
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterWhereClause> idGreaterThan(Id id,
|
||||
{bool include = false}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(
|
||||
IdWhereClause.greaterThan(lower: id, includeLower: include),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterWhereClause> idLessThan(Id id,
|
||||
{bool include = false}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(
|
||||
IdWhereClause.lessThan(upper: id, includeUpper: include),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterWhereClause> idBetween(
|
||||
Id lowerId,
|
||||
Id upperId, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addWhereClause(IdWhereClause.between(
|
||||
lower: lowerId,
|
||||
includeLower: includeLower,
|
||||
upper: upperId,
|
||||
includeUpper: includeUpper,
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension TaskInfoQueryFilter
|
||||
on QueryBuilder<TaskInfo, TaskInfo, QFilterCondition> {
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition>
|
||||
additionalTextIsNull() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(const FilterCondition.isNull(
|
||||
property: r'additionalText',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition>
|
||||
additionalTextIsNotNull() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(const FilterCondition.isNotNull(
|
||||
property: r'additionalText',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> additionalTextEqualTo(
|
||||
String? value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'additionalText',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition>
|
||||
additionalTextGreaterThan(
|
||||
String? value, {
|
||||
bool include = false,
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
include: include,
|
||||
property: r'additionalText',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition>
|
||||
additionalTextLessThan(
|
||||
String? value, {
|
||||
bool include = false,
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.lessThan(
|
||||
include: include,
|
||||
property: r'additionalText',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> additionalTextBetween(
|
||||
String? lower,
|
||||
String? upper, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.between(
|
||||
property: r'additionalText',
|
||||
lower: lower,
|
||||
includeLower: includeLower,
|
||||
upper: upper,
|
||||
includeUpper: includeUpper,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition>
|
||||
additionalTextStartsWith(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.startsWith(
|
||||
property: r'additionalText',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition>
|
||||
additionalTextEndsWith(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.endsWith(
|
||||
property: r'additionalText',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition>
|
||||
additionalTextContains(String value, {bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.contains(
|
||||
property: r'additionalText',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> additionalTextMatches(
|
||||
String pattern,
|
||||
{bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.matches(
|
||||
property: r'additionalText',
|
||||
wildcard: pattern,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition>
|
||||
additionalTextIsEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'additionalText',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition>
|
||||
additionalTextIsNotEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
property: r'additionalText',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> answerIsNull() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(const FilterCondition.isNull(
|
||||
property: r'answer',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> answerIsNotNull() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(const FilterCondition.isNotNull(
|
||||
property: r'answer',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> answerEqualTo(
|
||||
String? value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'answer',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> answerGreaterThan(
|
||||
String? value, {
|
||||
bool include = false,
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
include: include,
|
||||
property: r'answer',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> answerLessThan(
|
||||
String? value, {
|
||||
bool include = false,
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.lessThan(
|
||||
include: include,
|
||||
property: r'answer',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> answerBetween(
|
||||
String? lower,
|
||||
String? upper, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.between(
|
||||
property: r'answer',
|
||||
lower: lower,
|
||||
includeLower: includeLower,
|
||||
upper: upper,
|
||||
includeUpper: includeUpper,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> answerStartsWith(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.startsWith(
|
||||
property: r'answer',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> answerEndsWith(
|
||||
String value, {
|
||||
bool caseSensitive = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.endsWith(
|
||||
property: r'answer',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> answerContains(
|
||||
String value,
|
||||
{bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.contains(
|
||||
property: r'answer',
|
||||
value: value,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> answerMatches(
|
||||
String pattern,
|
||||
{bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.matches(
|
||||
property: r'answer',
|
||||
wildcard: pattern,
|
||||
caseSensitive: caseSensitive,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> answerIsEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'answer',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> answerIsNotEmpty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
property: r'answer',
|
||||
value: '',
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> idEqualTo(Id value) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'id',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> idGreaterThan(
|
||||
Id value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
include: include,
|
||||
property: r'id',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> idLessThan(
|
||||
Id value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.lessThan(
|
||||
include: include,
|
||||
property: r'id',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> idBetween(
|
||||
Id lower,
|
||||
Id upper, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.between(
|
||||
property: r'id',
|
||||
lower: lower,
|
||||
includeLower: includeLower,
|
||||
upper: upper,
|
||||
includeUpper: includeUpper,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> sIdEqualTo(
|
||||
int value) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'sId',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> sIdGreaterThan(
|
||||
int value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
include: include,
|
||||
property: r'sId',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> sIdLessThan(
|
||||
int value, {
|
||||
bool include = false,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.lessThan(
|
||||
include: include,
|
||||
property: r'sId',
|
||||
value: value,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterFilterCondition> sIdBetween(
|
||||
int lower,
|
||||
int upper, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.between(
|
||||
property: r'sId',
|
||||
lower: lower,
|
||||
includeLower: includeLower,
|
||||
upper: upper,
|
||||
includeUpper: includeUpper,
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension TaskInfoQueryObject
|
||||
on QueryBuilder<TaskInfo, TaskInfo, QFilterCondition> {}
|
||||
|
||||
extension TaskInfoQueryLinks
|
||||
on QueryBuilder<TaskInfo, TaskInfo, QFilterCondition> {}
|
||||
|
||||
extension TaskInfoQuerySortBy on QueryBuilder<TaskInfo, TaskInfo, QSortBy> {
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterSortBy> sortByAdditionalText() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'additionalText', Sort.asc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterSortBy> sortByAdditionalTextDesc() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'additionalText', Sort.desc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterSortBy> sortByAnswer() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'answer', Sort.asc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterSortBy> sortByAnswerDesc() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'answer', Sort.desc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterSortBy> sortBySId() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'sId', Sort.asc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterSortBy> sortBySIdDesc() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'sId', Sort.desc);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension TaskInfoQuerySortThenBy
|
||||
on QueryBuilder<TaskInfo, TaskInfo, QSortThenBy> {
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterSortBy> thenByAdditionalText() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'additionalText', Sort.asc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterSortBy> thenByAdditionalTextDesc() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'additionalText', Sort.desc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterSortBy> thenByAnswer() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'answer', Sort.asc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterSortBy> thenByAnswerDesc() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'answer', Sort.desc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterSortBy> thenById() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'id', Sort.asc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterSortBy> thenByIdDesc() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'id', Sort.desc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterSortBy> thenBySId() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'sId', Sort.asc);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QAfterSortBy> thenBySIdDesc() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addSortBy(r'sId', Sort.desc);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension TaskInfoQueryWhereDistinct
|
||||
on QueryBuilder<TaskInfo, TaskInfo, QDistinct> {
|
||||
QueryBuilder<TaskInfo, TaskInfo, QDistinct> distinctByAdditionalText(
|
||||
{bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addDistinctBy(r'additionalText',
|
||||
caseSensitive: caseSensitive);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QDistinct> distinctByAnswer(
|
||||
{bool caseSensitive = true}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addDistinctBy(r'answer', caseSensitive: caseSensitive);
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, TaskInfo, QDistinct> distinctBySId() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addDistinctBy(r'sId');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension TaskInfoQueryProperty
|
||||
on QueryBuilder<TaskInfo, TaskInfo, QQueryProperty> {
|
||||
QueryBuilder<TaskInfo, int, QQueryOperations> idProperty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addPropertyName(r'id');
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, String?, QQueryOperations> additionalTextProperty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addPropertyName(r'additionalText');
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, String?, QQueryOperations> answerProperty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addPropertyName(r'answer');
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TaskInfo, int, QQueryOperations> sIdProperty() {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addPropertyName(r'sId');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'tour_position.g.dart';
|
||||
|
||||
@embedded
|
||||
@JsonSerializable()
|
||||
class TourPosition {
|
||||
late double lat;
|
||||
late double long;
|
||||
|
||||
TourPosition();
|
||||
|
||||
factory TourPosition.fromJson(Map<String, dynamic> json) => _$TourPositionFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$TourPositionToJson(this);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,224 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'tour_position.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// IsarEmbeddedGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
|
||||
|
||||
const TourPositionSchema = Schema(
|
||||
name: r'TourPosition',
|
||||
id: -30020497969214738,
|
||||
properties: {
|
||||
r'lat': PropertySchema(
|
||||
id: 0,
|
||||
name: r'lat',
|
||||
type: IsarType.double,
|
||||
),
|
||||
r'long': PropertySchema(
|
||||
id: 1,
|
||||
name: r'long',
|
||||
type: IsarType.double,
|
||||
)
|
||||
},
|
||||
estimateSize: _tourPositionEstimateSize,
|
||||
serialize: _tourPositionSerialize,
|
||||
deserialize: _tourPositionDeserialize,
|
||||
deserializeProp: _tourPositionDeserializeProp,
|
||||
);
|
||||
|
||||
int _tourPositionEstimateSize(
|
||||
TourPosition object,
|
||||
List<int> offsets,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
var bytesCount = offsets.last;
|
||||
return bytesCount;
|
||||
}
|
||||
|
||||
void _tourPositionSerialize(
|
||||
TourPosition object,
|
||||
IsarWriter writer,
|
||||
List<int> offsets,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
writer.writeDouble(offsets[0], object.lat);
|
||||
writer.writeDouble(offsets[1], object.long);
|
||||
}
|
||||
|
||||
TourPosition _tourPositionDeserialize(
|
||||
Id id,
|
||||
IsarReader reader,
|
||||
List<int> offsets,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
final object = TourPosition();
|
||||
object.lat = reader.readDouble(offsets[0]);
|
||||
object.long = reader.readDouble(offsets[1]);
|
||||
return object;
|
||||
}
|
||||
|
||||
P _tourPositionDeserializeProp<P>(
|
||||
IsarReader reader,
|
||||
int propertyId,
|
||||
int offset,
|
||||
Map<Type, List<int>> allOffsets,
|
||||
) {
|
||||
switch (propertyId) {
|
||||
case 0:
|
||||
return (reader.readDouble(offset)) as P;
|
||||
case 1:
|
||||
return (reader.readDouble(offset)) as P;
|
||||
default:
|
||||
throw IsarError('Unknown property with id $propertyId');
|
||||
}
|
||||
}
|
||||
|
||||
extension TourPositionQueryFilter
|
||||
on QueryBuilder<TourPosition, TourPosition, QFilterCondition> {
|
||||
QueryBuilder<TourPosition, TourPosition, QAfterFilterCondition> latEqualTo(
|
||||
double value, {
|
||||
double epsilon = Query.epsilon,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'lat',
|
||||
value: value,
|
||||
epsilon: epsilon,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TourPosition, TourPosition, QAfterFilterCondition>
|
||||
latGreaterThan(
|
||||
double value, {
|
||||
bool include = false,
|
||||
double epsilon = Query.epsilon,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
include: include,
|
||||
property: r'lat',
|
||||
value: value,
|
||||
epsilon: epsilon,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TourPosition, TourPosition, QAfterFilterCondition> latLessThan(
|
||||
double value, {
|
||||
bool include = false,
|
||||
double epsilon = Query.epsilon,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.lessThan(
|
||||
include: include,
|
||||
property: r'lat',
|
||||
value: value,
|
||||
epsilon: epsilon,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TourPosition, TourPosition, QAfterFilterCondition> latBetween(
|
||||
double lower,
|
||||
double upper, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
double epsilon = Query.epsilon,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.between(
|
||||
property: r'lat',
|
||||
lower: lower,
|
||||
includeLower: includeLower,
|
||||
upper: upper,
|
||||
includeUpper: includeUpper,
|
||||
epsilon: epsilon,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TourPosition, TourPosition, QAfterFilterCondition> longEqualTo(
|
||||
double value, {
|
||||
double epsilon = Query.epsilon,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.equalTo(
|
||||
property: r'long',
|
||||
value: value,
|
||||
epsilon: epsilon,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TourPosition, TourPosition, QAfterFilterCondition>
|
||||
longGreaterThan(
|
||||
double value, {
|
||||
bool include = false,
|
||||
double epsilon = Query.epsilon,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.greaterThan(
|
||||
include: include,
|
||||
property: r'long',
|
||||
value: value,
|
||||
epsilon: epsilon,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TourPosition, TourPosition, QAfterFilterCondition> longLessThan(
|
||||
double value, {
|
||||
bool include = false,
|
||||
double epsilon = Query.epsilon,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.lessThan(
|
||||
include: include,
|
||||
property: r'long',
|
||||
value: value,
|
||||
epsilon: epsilon,
|
||||
));
|
||||
});
|
||||
}
|
||||
|
||||
QueryBuilder<TourPosition, TourPosition, QAfterFilterCondition> longBetween(
|
||||
double lower,
|
||||
double upper, {
|
||||
bool includeLower = true,
|
||||
bool includeUpper = true,
|
||||
double epsilon = Query.epsilon,
|
||||
}) {
|
||||
return QueryBuilder.apply(this, (query) {
|
||||
return query.addFilterCondition(FilterCondition.between(
|
||||
property: r'long',
|
||||
lower: lower,
|
||||
includeLower: includeLower,
|
||||
upper: upper,
|
||||
includeUpper: includeUpper,
|
||||
epsilon: epsilon,
|
||||
));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
extension TourPositionQueryObject
|
||||
on QueryBuilder<TourPosition, TourPosition, QFilterCondition> {}
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
TourPosition _$TourPositionFromJson(Map<String, dynamic> json) => TourPosition()
|
||||
..lat = (json['lat'] as num).toDouble()
|
||||
..long = (json['long'] as num).toDouble();
|
||||
|
||||
Map<String, dynamic> _$TourPositionToJson(TourPosition instance) =>
|
||||
<String, dynamic>{
|
||||
'lat': instance.lat,
|
||||
'long': instance.long,
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'tour_task.g.dart';
|
||||
|
||||
@embedded
|
||||
@JsonSerializable()
|
||||
class TourTask {
|
||||
@JsonKey(name: 's_id')
|
||||
late int sId;
|
||||
late int type;
|
||||
late String topic;
|
||||
late bool? opt;
|
||||
late bool? reenter;
|
||||
late int? min;
|
||||
late int? max;
|
||||
@JsonKey(name: 'max_len')
|
||||
late int? maxLen;
|
||||
late bool? rt;
|
||||
late bool? track;
|
||||
late List<String>? txt;
|
||||
@JsonKey(name: 'task_arrival')
|
||||
late int? taskArrival;
|
||||
@JsonKey(name: 'task_fin_work')
|
||||
late int? taskFinWork;
|
||||
|
||||
TourTask();
|
||||
|
||||
factory TourTask.fromJson(Map<String, dynamic> json) => _$TourTaskFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$TourTaskToJson(this);
|
||||
}
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user