Erweiterungen
This commit is contained in:
1 parent
a39991bb63
commit
8e5462bc91
30 files changed
+173
-2664
No files matched your search
@@ -1,54 +0,0 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'accept_job_message.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class AcceptJobMessage {
|
||||
late Reaction reaction;
|
||||
|
||||
AcceptJobMessage();
|
||||
|
||||
factory AcceptJobMessage.fromJson(Map<String, dynamic> json) => _$AcceptJobMessageFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$AcceptJobMessageToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class Reaction {
|
||||
late String id;
|
||||
late String ver;
|
||||
late int item;
|
||||
late Track track;
|
||||
|
||||
Reaction();
|
||||
|
||||
factory Reaction.fromJson(Map<String, dynamic> json) => _$ReactionFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$ReactionToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
@JsonSerializable()class Track {
|
||||
late String time;
|
||||
late Pos pos;
|
||||
|
||||
Track();
|
||||
|
||||
factory Track.fromJson(Map<String, dynamic> json) => _$TrackFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$TrackToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class Pos {
|
||||
late double lat;
|
||||
late double long;
|
||||
late double acc;
|
||||
|
||||
Pos();
|
||||
|
||||
factory Pos.fromJson(Map<String, dynamic> json) => _$PosFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$PosToJson(this);
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'accept_job_message.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
AcceptJobMessage _$AcceptJobMessageFromJson(Map<String, dynamic> json) =>
|
||||
AcceptJobMessage()
|
||||
..reaction = Reaction.fromJson(json['reaction'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$AcceptJobMessageToJson(AcceptJobMessage instance) =>
|
||||
<String, dynamic>{
|
||||
'reaction': instance.reaction,
|
||||
};
|
||||
|
||||
Reaction _$ReactionFromJson(Map<String, dynamic> json) => Reaction()
|
||||
..id = json['id'] as String
|
||||
..ver = json['ver'] as String
|
||||
..item = json['item'] as int
|
||||
..track = Track.fromJson(json['track'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$ReactionToJson(Reaction instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'ver': instance.ver,
|
||||
'item': instance.item,
|
||||
'track': instance.track,
|
||||
};
|
||||
|
||||
Track _$TrackFromJson(Map<String, dynamic> json) => Track()
|
||||
..time = json['time'] as String
|
||||
..pos = Pos.fromJson(json['pos'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$TrackToJson(Track instance) => <String, dynamic>{
|
||||
'time': instance.time,
|
||||
'pos': instance.pos,
|
||||
};
|
||||
|
||||
Pos _$PosFromJson(Map<String, dynamic> json) => Pos()
|
||||
..lat = (json['lat'] as num).toDouble()
|
||||
..long = (json['long'] as num).toDouble()
|
||||
..acc = (json['acc'] as num).toDouble();
|
||||
|
||||
Map<String, dynamic> _$PosToJson(Pos instance) => <String, dynamic>{
|
||||
'lat': instance.lat,
|
||||
'long': instance.long,
|
||||
'acc': instance.acc,
|
||||
};
|
||||
@@ -1,21 +0,0 @@
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
// 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,
|
||||
};
|
||||
@@ -1,19 +0,0 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:stadtbote/model/bootstrap_response_topics.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);
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
// 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,
|
||||
};
|
||||
@@ -1,17 +0,0 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:stadtbote/model/bootstrap_response_config.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);
|
||||
}
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
// 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,
|
||||
};
|
||||
@@ -1,20 +0,0 @@
|
||||
import 'package:json_annotation/json_annotation.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);
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
// 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,
|
||||
};
|
||||
@@ -1,17 +0,0 @@
|
||||
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);
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
// 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,
|
||||
};
|
||||
@@ -1,21 +0,0 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'payload_container.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class PayloadContainer {
|
||||
late String recv;
|
||||
|
||||
late bool store;
|
||||
|
||||
late String id;
|
||||
|
||||
late Map<String, dynamic> payload;
|
||||
|
||||
PayloadContainer();
|
||||
|
||||
factory PayloadContainer.fromJson(Map<String, dynamic> json) => _$PayloadContainerFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$PayloadContainerToJson(this);
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'payload_container.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
PayloadContainer _$PayloadContainerFromJson(Map<String, dynamic> json) =>
|
||||
PayloadContainer()
|
||||
..recv = json['recv'] as String
|
||||
..store = json['store'] as bool
|
||||
..id = json['id'] as String
|
||||
..payload = json['payload'] as Map<String, dynamic>;
|
||||
|
||||
Map<String, dynamic> _$PayloadContainerToJson(PayloadContainer instance) =>
|
||||
<String, dynamic>{
|
||||
'recv': instance.recv,
|
||||
'store': instance.store,
|
||||
'id': instance.id,
|
||||
'payload': instance.payload,
|
||||
};
|
||||
@@ -1,104 +0,0 @@
|
||||
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
@@ -1,35 +0,0 @@
|
||||
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,
|
||||
};*/
|
||||
}
|
||||
@@ -1,342 +0,0 @@
|
||||
// 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> {}
|
||||
@@ -1,36 +0,0 @@
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:stadtbote/tools/util.dart';
|
||||
|
||||
part 'start_session_message.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class StartSessionMessage {
|
||||
Id get isarId => Util.fastHash(messageId);
|
||||
|
||||
late String recv;
|
||||
|
||||
late bool store;
|
||||
|
||||
late String messageId;
|
||||
|
||||
late Payload payload;
|
||||
|
||||
StartSessionMessage();
|
||||
|
||||
factory StartSessionMessage.fromJson(Map<String, dynamic> json) => _$StartSessionMessageFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$StartSessionMessageToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class Payload {
|
||||
@JsonKey(name:'start_session')
|
||||
late String startSession;
|
||||
|
||||
Payload();
|
||||
|
||||
factory Payload.fromJson(Map<String, dynamic> json) => _$PayloadFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$PayloadToJson(this);
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'start_session_message.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
StartSessionMessage _$StartSessionMessageFromJson(Map<String, dynamic> json) =>
|
||||
StartSessionMessage()
|
||||
..recv = json['recv'] as String
|
||||
..store = json['store'] as bool
|
||||
..messageId = json['messageId'] as String
|
||||
..payload = Payload.fromJson(json['payload'] as Map<String, dynamic>);
|
||||
|
||||
Map<String, dynamic> _$StartSessionMessageToJson(
|
||||
StartSessionMessage instance) =>
|
||||
<String, dynamic>{
|
||||
'recv': instance.recv,
|
||||
'store': instance.store,
|
||||
'messageId': instance.messageId,
|
||||
'payload': instance.payload,
|
||||
};
|
||||
|
||||
Payload _$PayloadFromJson(Map<String, dynamic> json) =>
|
||||
Payload()..startSession = json['start_session'] as String;
|
||||
|
||||
Map<String, dynamic> _$PayloadToJson(Payload instance) => <String, dynamic>{
|
||||
'start_session': instance.startSession,
|
||||
};
|
||||
Reference in new issue
Block a user