> allOffsets,
) {
var bytesCount = offsets.last;
+ bytesCount += 3 + object.alarmDate.length * 3;
bytesCount += 3 + object.alarmID.length * 3;
bytesCount += 3 + object.alarmTime.length * 3;
bytesCount += 3 + object.days.length;
@@ -247,6 +283,7 @@ int _alarmModelEstimateSize(
bytesCount += 3 + value.length * 3;
}
}
+ bytesCount += 3 + object.guardian.length * 3;
bytesCount += 3 + object.label.length * 3;
bytesCount += 3 + object.lastEditedUserId.length * 3;
bytesCount += 3 + object.location.length * 3;
@@ -259,6 +296,7 @@ int _alarmModelEstimateSize(
bytesCount += 3 + object.note.length * 3;
bytesCount += 3 + object.ownerId.length * 3;
bytesCount += 3 + object.ownerName.length * 3;
+ bytesCount += 3 + object.profile.length * 3;
bytesCount += 3 + object.qrValue.length * 3;
bytesCount += 3 + object.ringtoneName.length * 3;
{
@@ -285,44 +323,51 @@ void _alarmModelSerialize(
) {
writer.writeLong(offsets[0], object.activityInterval);
writer.writeLong(offsets[1], object.activityMonitor);
- writer.writeString(offsets[2], object.alarmID);
- writer.writeString(offsets[3], object.alarmTime);
- writer.writeBoolList(offsets[4], object.days);
- writer.writeBool(offsets[5], object.deleteAfterGoesOff);
- writer.writeString(offsets[6], object.firestoreId);
- writer.writeLong(offsets[7], object.gradient);
- writer.writeLong(offsets[8], object.intervalToAlarm);
- writer.writeBool(offsets[9], object.isActivityEnabled);
- writer.writeBool(offsets[10], object.isEnabled);
- writer.writeBool(offsets[11], object.isLocationEnabled);
- writer.writeBool(offsets[12], object.isMathsEnabled);
- writer.writeBool(offsets[13], object.isOneTime);
- writer.writeBool(offsets[14], object.isPedometerEnabled);
- writer.writeBool(offsets[15], object.isQrEnabled);
- writer.writeBool(offsets[16], object.isShakeEnabled);
- writer.writeBool(offsets[17], object.isSharedAlarmEnabled);
- writer.writeBool(offsets[18], object.isWeatherEnabled);
- writer.writeString(offsets[19], object.label);
- writer.writeString(offsets[20], object.lastEditedUserId);
- writer.writeString(offsets[21], object.location);
- writer.writeString(offsets[22], object.mainAlarmTime);
- writer.writeLong(offsets[23], object.mathsDifficulty);
- writer.writeLong(offsets[24], object.minutesSinceMidnight);
- writer.writeBool(offsets[25], object.mutexLock);
- writer.writeString(offsets[26], object.note);
- writer.writeLong(offsets[27], object.numMathsQuestions);
- writer.writeLong(offsets[28], object.numberOfSteps);
- writer.writeString(offsets[29], object.ownerId);
- writer.writeString(offsets[30], object.ownerName);
- writer.writeString(offsets[31], object.qrValue);
- writer.writeString(offsets[32], object.ringtoneName);
- writer.writeLong(offsets[33], object.shakeTimes);
- writer.writeStringList(offsets[34], object.sharedUserIds);
- writer.writeBool(offsets[35], object.showMotivationalQuote);
- writer.writeLong(offsets[36], object.snoozeDuration);
- writer.writeDouble(offsets[37], object.volMax);
- writer.writeDouble(offsets[38], object.volMin);
- writer.writeLongList(offsets[39], object.weatherTypes);
+ writer.writeString(offsets[2], object.alarmDate);
+ writer.writeString(offsets[3], object.alarmID);
+ writer.writeString(offsets[4], object.alarmTime);
+ writer.writeBoolList(offsets[5], object.days);
+ writer.writeBool(offsets[6], object.deleteAfterGoesOff);
+ writer.writeString(offsets[7], object.firestoreId);
+ writer.writeLong(offsets[8], object.gradient);
+ writer.writeString(offsets[9], object.guardian);
+ writer.writeLong(offsets[10], object.guardianTimer);
+ writer.writeLong(offsets[11], object.intervalToAlarm);
+ writer.writeBool(offsets[12], object.isActivityEnabled);
+ writer.writeBool(offsets[13], object.isCall);
+ writer.writeBool(offsets[14], object.isEnabled);
+ writer.writeBool(offsets[15], object.isGuardian);
+ writer.writeBool(offsets[16], object.isLocationEnabled);
+ writer.writeBool(offsets[17], object.isMathsEnabled);
+ writer.writeBool(offsets[18], object.isOneTime);
+ writer.writeBool(offsets[19], object.isPedometerEnabled);
+ writer.writeBool(offsets[20], object.isQrEnabled);
+ writer.writeBool(offsets[21], object.isShakeEnabled);
+ writer.writeBool(offsets[22], object.isSharedAlarmEnabled);
+ writer.writeBool(offsets[23], object.isWeatherEnabled);
+ writer.writeString(offsets[24], object.label);
+ writer.writeString(offsets[25], object.lastEditedUserId);
+ writer.writeString(offsets[26], object.location);
+ writer.writeString(offsets[27], object.mainAlarmTime);
+ writer.writeLong(offsets[28], object.mathsDifficulty);
+ writer.writeLong(offsets[29], object.minutesSinceMidnight);
+ writer.writeBool(offsets[30], object.mutexLock);
+ writer.writeString(offsets[31], object.note);
+ writer.writeLong(offsets[32], object.numMathsQuestions);
+ writer.writeLong(offsets[33], object.numberOfSteps);
+ writer.writeString(offsets[34], object.ownerId);
+ writer.writeString(offsets[35], object.ownerName);
+ writer.writeString(offsets[36], object.profile);
+ writer.writeString(offsets[37], object.qrValue);
+ writer.writeBool(offsets[38], object.ringOn);
+ writer.writeString(offsets[39], object.ringtoneName);
+ writer.writeLong(offsets[40], object.shakeTimes);
+ writer.writeStringList(offsets[41], object.sharedUserIds);
+ writer.writeBool(offsets[42], object.showMotivationalQuote);
+ writer.writeLong(offsets[43], object.snoozeDuration);
+ writer.writeDouble(offsets[44], object.volMax);
+ writer.writeDouble(offsets[45], object.volMin);
+ writer.writeLongList(offsets[46], object.weatherTypes);
}
AlarmModel _alarmModelDeserialize(
@@ -334,45 +379,52 @@ AlarmModel _alarmModelDeserialize(
final object = AlarmModel(
activityInterval: reader.readLong(offsets[0]),
activityMonitor: reader.readLong(offsets[1]),
- alarmID: reader.readString(offsets[2]),
- alarmTime: reader.readString(offsets[3]),
- days: reader.readBoolList(offsets[4]) ?? [],
- deleteAfterGoesOff: reader.readBool(offsets[5]),
- gradient: reader.readLong(offsets[7]),
- intervalToAlarm: reader.readLong(offsets[8]),
- isActivityEnabled: reader.readBool(offsets[9]),
- isEnabled: reader.readBoolOrNull(offsets[10]) ?? true,
- isLocationEnabled: reader.readBool(offsets[11]),
- isMathsEnabled: reader.readBool(offsets[12]),
- isOneTime: reader.readBool(offsets[13]),
- isPedometerEnabled: reader.readBool(offsets[14]),
- isQrEnabled: reader.readBool(offsets[15]),
- isShakeEnabled: reader.readBool(offsets[16]),
- isSharedAlarmEnabled: reader.readBool(offsets[17]),
- isWeatherEnabled: reader.readBool(offsets[18]),
- label: reader.readString(offsets[19]),
- lastEditedUserId: reader.readString(offsets[20]),
- location: reader.readString(offsets[21]),
- mainAlarmTime: reader.readStringOrNull(offsets[22]),
- mathsDifficulty: reader.readLong(offsets[23]),
- minutesSinceMidnight: reader.readLong(offsets[24]),
- mutexLock: reader.readBool(offsets[25]),
- note: reader.readString(offsets[26]),
- numMathsQuestions: reader.readLong(offsets[27]),
- numberOfSteps: reader.readLong(offsets[28]),
- ownerId: reader.readString(offsets[29]),
- ownerName: reader.readString(offsets[30]),
- qrValue: reader.readString(offsets[31]),
- ringtoneName: reader.readString(offsets[32]),
- shakeTimes: reader.readLong(offsets[33]),
- sharedUserIds: reader.readStringList(offsets[34]),
- showMotivationalQuote: reader.readBool(offsets[35]),
- snoozeDuration: reader.readLong(offsets[36]),
- volMax: reader.readDouble(offsets[37]),
- volMin: reader.readDouble(offsets[38]),
- weatherTypes: reader.readLongList(offsets[39]) ?? [],
+ alarmDate: reader.readString(offsets[2]),
+ alarmID: reader.readString(offsets[3]),
+ alarmTime: reader.readString(offsets[4]),
+ days: reader.readBoolList(offsets[5]) ?? [],
+ deleteAfterGoesOff: reader.readBool(offsets[6]),
+ gradient: reader.readLong(offsets[8]),
+ guardian: reader.readString(offsets[9]),
+ guardianTimer: reader.readLong(offsets[10]),
+ intervalToAlarm: reader.readLong(offsets[11]),
+ isActivityEnabled: reader.readBool(offsets[12]),
+ isCall: reader.readBool(offsets[13]),
+ isEnabled: reader.readBoolOrNull(offsets[14]) ?? true,
+ isGuardian: reader.readBool(offsets[15]),
+ isLocationEnabled: reader.readBool(offsets[16]),
+ isMathsEnabled: reader.readBool(offsets[17]),
+ isOneTime: reader.readBool(offsets[18]),
+ isPedometerEnabled: reader.readBool(offsets[19]),
+ isQrEnabled: reader.readBool(offsets[20]),
+ isShakeEnabled: reader.readBool(offsets[21]),
+ isSharedAlarmEnabled: reader.readBool(offsets[22]),
+ isWeatherEnabled: reader.readBool(offsets[23]),
+ label: reader.readString(offsets[24]),
+ lastEditedUserId: reader.readString(offsets[25]),
+ location: reader.readString(offsets[26]),
+ mainAlarmTime: reader.readStringOrNull(offsets[27]),
+ mathsDifficulty: reader.readLong(offsets[28]),
+ minutesSinceMidnight: reader.readLong(offsets[29]),
+ mutexLock: reader.readBool(offsets[30]),
+ note: reader.readString(offsets[31]),
+ numMathsQuestions: reader.readLong(offsets[32]),
+ numberOfSteps: reader.readLong(offsets[33]),
+ ownerId: reader.readString(offsets[34]),
+ ownerName: reader.readString(offsets[35]),
+ profile: reader.readString(offsets[36]),
+ qrValue: reader.readString(offsets[37]),
+ ringOn: reader.readBool(offsets[38]),
+ ringtoneName: reader.readString(offsets[39]),
+ shakeTimes: reader.readLong(offsets[40]),
+ sharedUserIds: reader.readStringList(offsets[41]),
+ showMotivationalQuote: reader.readBool(offsets[42]),
+ snoozeDuration: reader.readLong(offsets[43]),
+ volMax: reader.readDouble(offsets[44]),
+ volMin: reader.readDouble(offsets[45]),
+ weatherTypes: reader.readLongList(offsets[46]) ?? [],
);
- object.firestoreId = reader.readStringOrNull(offsets[6]);
+ object.firestoreId = reader.readStringOrNull(offsets[7]);
object.isarId = id;
return object;
}
@@ -393,27 +445,27 @@ P _alarmModelDeserializeProp(
case 3:
return (reader.readString(offset)) as P;
case 4:
- return (reader.readBoolList(offset) ?? []) as P;
+ return (reader.readString(offset)) as P;
case 5:
- return (reader.readBool(offset)) as P;
+ return (reader.readBoolList(offset) ?? []) as P;
case 6:
- return (reader.readStringOrNull(offset)) as P;
+ return (reader.readBool(offset)) as P;
case 7:
- return (reader.readLong(offset)) as P;
+ return (reader.readStringOrNull(offset)) as P;
case 8:
return (reader.readLong(offset)) as P;
case 9:
- return (reader.readBool(offset)) as P;
+ return (reader.readString(offset)) as P;
case 10:
- return (reader.readBoolOrNull(offset) ?? true) as P;
+ return (reader.readLong(offset)) as P;
case 11:
- return (reader.readBool(offset)) as P;
+ return (reader.readLong(offset)) as P;
case 12:
return (reader.readBool(offset)) as P;
case 13:
return (reader.readBool(offset)) as P;
case 14:
- return (reader.readBool(offset)) as P;
+ return (reader.readBoolOrNull(offset) ?? true) as P;
case 15:
return (reader.readBool(offset)) as P;
case 16:
@@ -423,46 +475,60 @@ P _alarmModelDeserializeProp
(
case 18:
return (reader.readBool(offset)) as P;
case 19:
- return (reader.readString(offset)) as P;
+ return (reader.readBool(offset)) as P;
case 20:
- return (reader.readString(offset)) as P;
+ return (reader.readBool(offset)) as P;
case 21:
- return (reader.readString(offset)) as P;
+ return (reader.readBool(offset)) as P;
case 22:
- return (reader.readStringOrNull(offset)) as P;
+ return (reader.readBool(offset)) as P;
case 23:
- return (reader.readLong(offset)) as P;
+ return (reader.readBool(offset)) as P;
case 24:
- return (reader.readLong(offset)) as P;
+ return (reader.readString(offset)) as P;
case 25:
- return (reader.readBool(offset)) as P;
+ return (reader.readString(offset)) as P;
case 26:
return (reader.readString(offset)) as P;
case 27:
- return (reader.readLong(offset)) as P;
+ return (reader.readStringOrNull(offset)) as P;
case 28:
return (reader.readLong(offset)) as P;
case 29:
- return (reader.readString(offset)) as P;
+ return (reader.readLong(offset)) as P;
case 30:
- return (reader.readString(offset)) as P;
+ return (reader.readBool(offset)) as P;
case 31:
return (reader.readString(offset)) as P;
case 32:
- return (reader.readString(offset)) as P;
+ return (reader.readLong(offset)) as P;
case 33:
return (reader.readLong(offset)) as P;
case 34:
- return (reader.readStringList(offset)) as P;
+ return (reader.readString(offset)) as P;
case 35:
- return (reader.readBool(offset)) as P;
+ return (reader.readString(offset)) as P;
case 36:
- return (reader.readLong(offset)) as P;
+ return (reader.readString(offset)) as P;
case 37:
- return (reader.readDouble(offset)) as P;
+ return (reader.readString(offset)) as P;
case 38:
- return (reader.readDouble(offset)) as P;
+ return (reader.readBool(offset)) as P;
case 39:
+ return (reader.readString(offset)) as P;
+ case 40:
+ return (reader.readLong(offset)) as P;
+ case 41:
+ return (reader.readStringList(offset)) as P;
+ case 42:
+ return (reader.readBool(offset)) as P;
+ case 43:
+ return (reader.readLong(offset)) as P;
+ case 44:
+ return (reader.readDouble(offset)) as P;
+ case 45:
+ return (reader.readDouble(offset)) as P;
+ case 46:
return (reader.readLongList(offset) ?? []) as P;
default:
throw IsarError('Unknown property with id $propertyId');
@@ -676,6 +742,140 @@ extension AlarmModelQueryFilter
});
}
+ QueryBuilder alarmDateEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'alarmDate',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ alarmDateGreaterThan(
+ String value, {
+ bool include = false,
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.greaterThan(
+ include: include,
+ property: r'alarmDate',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder alarmDateLessThan(
+ String value, {
+ bool include = false,
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.lessThan(
+ include: include,
+ property: r'alarmDate',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder alarmDateBetween(
+ 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'alarmDate',
+ lower: lower,
+ includeLower: includeLower,
+ upper: upper,
+ includeUpper: includeUpper,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ alarmDateStartsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.startsWith(
+ property: r'alarmDate',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder alarmDateEndsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.endsWith(
+ property: r'alarmDate',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder alarmDateContains(
+ String value,
+ {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.contains(
+ property: r'alarmDate',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder alarmDateMatches(
+ String pattern,
+ {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.matches(
+ property: r'alarmDate',
+ wildcard: pattern,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ alarmDateIsEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'alarmDate',
+ value: '',
+ ));
+ });
+ }
+
+ QueryBuilder
+ alarmDateIsNotEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.greaterThan(
+ property: r'alarmDate',
+ value: '',
+ ));
+ });
+ }
+
QueryBuilder alarmIDEqualTo(
String value, {
bool caseSensitive = true,
@@ -1021,59 +1221,248 @@ extension AlarmModelQueryFilter
});
}
- QueryBuilder daysLengthBetween(
- int lower,
- int upper, {
- bool includeLower = true,
- bool includeUpper = true,
- }) {
+ QueryBuilder daysLengthBetween(
+ int lower,
+ int upper, {
+ bool includeLower = true,
+ bool includeUpper = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.listLength(
+ r'days',
+ lower,
+ includeLower,
+ upper,
+ includeUpper,
+ );
+ });
+ }
+
+ QueryBuilder
+ deleteAfterGoesOffEqualTo(bool value) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'deleteAfterGoesOff',
+ value: value,
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdIsNull() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(const FilterCondition.isNull(
+ property: r'firestoreId',
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdIsNotNull() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(const FilterCondition.isNotNull(
+ property: r'firestoreId',
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdEqualTo(
+ String? value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'firestoreId',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdGreaterThan(
+ String? value, {
+ bool include = false,
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.greaterThan(
+ include: include,
+ property: r'firestoreId',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdLessThan(
+ String? value, {
+ bool include = false,
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.lessThan(
+ include: include,
+ property: r'firestoreId',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdBetween(
+ 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'firestoreId',
+ lower: lower,
+ includeLower: includeLower,
+ upper: upper,
+ includeUpper: includeUpper,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdStartsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.startsWith(
+ property: r'firestoreId',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdEndsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.endsWith(
+ property: r'firestoreId',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdContains(String value, {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.contains(
+ property: r'firestoreId',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdMatches(String pattern, {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.matches(
+ property: r'firestoreId',
+ wildcard: pattern,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdIsEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'firestoreId',
+ value: '',
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdIsNotEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.greaterThan(
+ property: r'firestoreId',
+ value: '',
+ ));
+ });
+ }
+
+ QueryBuilder gradientEqualTo(
+ int value) {
return QueryBuilder.apply(this, (query) {
- return query.listLength(
- r'days',
- lower,
- includeLower,
- upper,
- includeUpper,
- );
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'gradient',
+ value: value,
+ ));
});
}
QueryBuilder
- deleteAfterGoesOffEqualTo(bool value) {
+ gradientGreaterThan(
+ int value, {
+ bool include = false,
+ }) {
return QueryBuilder.apply(this, (query) {
- return query.addFilterCondition(FilterCondition.equalTo(
- property: r'deleteAfterGoesOff',
+ return query.addFilterCondition(FilterCondition.greaterThan(
+ include: include,
+ property: r'gradient',
value: value,
));
});
}
- QueryBuilder
- firestoreIdIsNull() {
+ QueryBuilder gradientLessThan(
+ int value, {
+ bool include = false,
+ }) {
return QueryBuilder.apply(this, (query) {
- return query.addFilterCondition(const FilterCondition.isNull(
- property: r'firestoreId',
+ return query.addFilterCondition(FilterCondition.lessThan(
+ include: include,
+ property: r'gradient',
+ value: value,
));
});
}
- QueryBuilder
- firestoreIdIsNotNull() {
+ QueryBuilder gradientBetween(
+ int lower,
+ int upper, {
+ bool includeLower = true,
+ bool includeUpper = true,
+ }) {
return QueryBuilder.apply(this, (query) {
- return query.addFilterCondition(const FilterCondition.isNotNull(
- property: r'firestoreId',
+ return query.addFilterCondition(FilterCondition.between(
+ property: r'gradient',
+ lower: lower,
+ includeLower: includeLower,
+ upper: upper,
+ includeUpper: includeUpper,
));
});
}
- QueryBuilder
- firestoreIdEqualTo(
- String? value, {
+ QueryBuilder guardianEqualTo(
+ String value, {
bool caseSensitive = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
- property: r'firestoreId',
+ property: r'guardian',
value: value,
caseSensitive: caseSensitive,
));
@@ -1081,48 +1470,46 @@ extension AlarmModelQueryFilter
}
QueryBuilder
- firestoreIdGreaterThan(
- String? value, {
+ guardianGreaterThan(
+ String value, {
bool include = false,
bool caseSensitive = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
include: include,
- property: r'firestoreId',
+ property: r'guardian',
value: value,
caseSensitive: caseSensitive,
));
});
}
- QueryBuilder
- firestoreIdLessThan(
- String? value, {
+ QueryBuilder guardianLessThan(
+ String value, {
bool include = false,
bool caseSensitive = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.lessThan(
include: include,
- property: r'firestoreId',
+ property: r'guardian',
value: value,
caseSensitive: caseSensitive,
));
});
}
- QueryBuilder
- firestoreIdBetween(
- String? lower,
- String? upper, {
+ QueryBuilder guardianBetween(
+ 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'firestoreId',
+ property: r'guardian',
lower: lower,
includeLower: includeLower,
upper: upper,
@@ -1133,49 +1520,50 @@ extension AlarmModelQueryFilter
}
QueryBuilder
- firestoreIdStartsWith(
+ guardianStartsWith(
String value, {
bool caseSensitive = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.startsWith(
- property: r'firestoreId',
+ property: r'guardian',
value: value,
caseSensitive: caseSensitive,
));
});
}
- QueryBuilder
- firestoreIdEndsWith(
+ QueryBuilder guardianEndsWith(
String value, {
bool caseSensitive = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.endsWith(
- property: r'firestoreId',
+ property: r'guardian',
value: value,
caseSensitive: caseSensitive,
));
});
}
- QueryBuilder
- firestoreIdContains(String value, {bool caseSensitive = true}) {
+ QueryBuilder guardianContains(
+ String value,
+ {bool caseSensitive = true}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.contains(
- property: r'firestoreId',
+ property: r'guardian',
value: value,
caseSensitive: caseSensitive,
));
});
}
- QueryBuilder
- firestoreIdMatches(String pattern, {bool caseSensitive = true}) {
+ QueryBuilder guardianMatches(
+ String pattern,
+ {bool caseSensitive = true}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.matches(
- property: r'firestoreId',
+ property: r'guardian',
wildcard: pattern,
caseSensitive: caseSensitive,
));
@@ -1183,63 +1571,65 @@ extension AlarmModelQueryFilter
}
QueryBuilder
- firestoreIdIsEmpty() {
+ guardianIsEmpty() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
- property: r'firestoreId',
+ property: r'guardian',
value: '',
));
});
}
QueryBuilder
- firestoreIdIsNotEmpty() {
+ guardianIsNotEmpty() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
- property: r'firestoreId',
+ property: r'guardian',
value: '',
));
});
}
- QueryBuilder gradientEqualTo(
- int value) {
+ QueryBuilder
+ guardianTimerEqualTo(int value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
- property: r'gradient',
+ property: r'guardianTimer',
value: value,
));
});
}
QueryBuilder
- gradientGreaterThan(
+ guardianTimerGreaterThan(
int value, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
include: include,
- property: r'gradient',
+ property: r'guardianTimer',
value: value,
));
});
}
- QueryBuilder gradientLessThan(
+ QueryBuilder
+ guardianTimerLessThan(
int value, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.lessThan(
include: include,
- property: r'gradient',
+ property: r'guardianTimer',
value: value,
));
});
}
- QueryBuilder gradientBetween(
+ QueryBuilder
+ guardianTimerBetween(
int lower,
int upper, {
bool includeLower = true,
@@ -1247,7 +1637,7 @@ extension AlarmModelQueryFilter
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.between(
- property: r'gradient',
+ property: r'guardianTimer',
lower: lower,
includeLower: includeLower,
upper: upper,
@@ -1322,6 +1712,16 @@ extension AlarmModelQueryFilter
});
}
+ QueryBuilder isCallEqualTo(
+ bool value) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'isCall',
+ value: value,
+ ));
+ });
+ }
+
QueryBuilder isEnabledEqualTo(
bool value) {
return QueryBuilder.apply(this, (query) {
@@ -1332,6 +1732,16 @@ extension AlarmModelQueryFilter
});
}
+ QueryBuilder isGuardianEqualTo(
+ bool value) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'isGuardian',
+ value: value,
+ ));
+ });
+ }
+
QueryBuilder
isLocationEnabledEqualTo(bool value) {
return QueryBuilder.apply(this, (query) {
@@ -2374,23 +2784,155 @@ extension AlarmModelQueryFilter
bool includeUpper = true,
}) {
return QueryBuilder.apply(this, (query) {
- return query.addFilterCondition(FilterCondition.between(
- property: r'numberOfSteps',
- lower: lower,
- includeLower: includeLower,
- upper: upper,
- includeUpper: includeUpper,
+ return query.addFilterCondition(FilterCondition.between(
+ property: r'numberOfSteps',
+ lower: lower,
+ includeLower: includeLower,
+ upper: upper,
+ includeUpper: includeUpper,
+ ));
+ });
+ }
+
+ QueryBuilder ownerIdEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'ownerId',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ ownerIdGreaterThan(
+ String value, {
+ bool include = false,
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.greaterThan(
+ include: include,
+ property: r'ownerId',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder ownerIdLessThan(
+ String value, {
+ bool include = false,
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.lessThan(
+ include: include,
+ property: r'ownerId',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder ownerIdBetween(
+ 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'ownerId',
+ lower: lower,
+ includeLower: includeLower,
+ upper: upper,
+ includeUpper: includeUpper,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder ownerIdStartsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.startsWith(
+ property: r'ownerId',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder ownerIdEndsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.endsWith(
+ property: r'ownerId',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder ownerIdContains(
+ String value,
+ {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.contains(
+ property: r'ownerId',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder ownerIdMatches(
+ String pattern,
+ {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.matches(
+ property: r'ownerId',
+ wildcard: pattern,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder ownerIdIsEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'ownerId',
+ value: '',
+ ));
+ });
+ }
+
+ QueryBuilder
+ ownerIdIsNotEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.greaterThan(
+ property: r'ownerId',
+ value: '',
));
});
}
- QueryBuilder ownerIdEqualTo(
+ QueryBuilder ownerNameEqualTo(
String value, {
bool caseSensitive = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
- property: r'ownerId',
+ property: r'ownerName',
value: value,
caseSensitive: caseSensitive,
));
@@ -2398,7 +2940,7 @@ extension AlarmModelQueryFilter
}
QueryBuilder
- ownerIdGreaterThan(
+ ownerNameGreaterThan(
String value, {
bool include = false,
bool caseSensitive = true,
@@ -2406,14 +2948,14 @@ extension AlarmModelQueryFilter
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
include: include,
- property: r'ownerId',
+ property: r'ownerName',
value: value,
caseSensitive: caseSensitive,
));
});
}
- QueryBuilder ownerIdLessThan(
+ QueryBuilder ownerNameLessThan(
String value, {
bool include = false,
bool caseSensitive = true,
@@ -2421,14 +2963,14 @@ extension AlarmModelQueryFilter
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.lessThan(
include: include,
- property: r'ownerId',
+ property: r'ownerName',
value: value,
caseSensitive: caseSensitive,
));
});
}
- QueryBuilder ownerIdBetween(
+ QueryBuilder ownerNameBetween(
String lower,
String upper, {
bool includeLower = true,
@@ -2437,7 +2979,7 @@ extension AlarmModelQueryFilter
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.between(
- property: r'ownerId',
+ property: r'ownerName',
lower: lower,
includeLower: includeLower,
upper: upper,
@@ -2447,82 +2989,84 @@ extension AlarmModelQueryFilter
});
}
- QueryBuilder ownerIdStartsWith(
+ QueryBuilder
+ ownerNameStartsWith(
String value, {
bool caseSensitive = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.startsWith(
- property: r'ownerId',
+ property: r'ownerName',
value: value,
caseSensitive: caseSensitive,
));
});
}
- QueryBuilder ownerIdEndsWith(
+ QueryBuilder ownerNameEndsWith(
String value, {
bool caseSensitive = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.endsWith(
- property: r'ownerId',
+ property: r'ownerName',
value: value,
caseSensitive: caseSensitive,
));
});
}
- QueryBuilder ownerIdContains(
+ QueryBuilder ownerNameContains(
String value,
{bool caseSensitive = true}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.contains(
- property: r'ownerId',
+ property: r'ownerName',
value: value,
caseSensitive: caseSensitive,
));
});
}
- QueryBuilder ownerIdMatches(
+ QueryBuilder ownerNameMatches(
String pattern,
{bool caseSensitive = true}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.matches(
- property: r'ownerId',
+ property: r'ownerName',
wildcard: pattern,
caseSensitive: caseSensitive,
));
});
}
- QueryBuilder ownerIdIsEmpty() {
+ QueryBuilder
+ ownerNameIsEmpty() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
- property: r'ownerId',
+ property: r'ownerName',
value: '',
));
});
}
QueryBuilder
- ownerIdIsNotEmpty() {
+ ownerNameIsNotEmpty() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
- property: r'ownerId',
+ property: r'ownerName',
value: '',
));
});
}
- QueryBuilder ownerNameEqualTo(
+ QueryBuilder profileEqualTo(
String value, {
bool caseSensitive = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
- property: r'ownerName',
+ property: r'profile',
value: value,
caseSensitive: caseSensitive,
));
@@ -2530,7 +3074,7 @@ extension AlarmModelQueryFilter
}
QueryBuilder
- ownerNameGreaterThan(
+ profileGreaterThan(
String value, {
bool include = false,
bool caseSensitive = true,
@@ -2538,14 +3082,14 @@ extension AlarmModelQueryFilter
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
include: include,
- property: r'ownerName',
+ property: r'profile',
value: value,
caseSensitive: caseSensitive,
));
});
}
- QueryBuilder ownerNameLessThan(
+ QueryBuilder profileLessThan(
String value, {
bool include = false,
bool caseSensitive = true,
@@ -2553,14 +3097,14 @@ extension AlarmModelQueryFilter
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.lessThan(
include: include,
- property: r'ownerName',
+ property: r'profile',
value: value,
caseSensitive: caseSensitive,
));
});
}
- QueryBuilder ownerNameBetween(
+ QueryBuilder profileBetween(
String lower,
String upper, {
bool includeLower = true,
@@ -2569,7 +3113,7 @@ extension AlarmModelQueryFilter
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.between(
- property: r'ownerName',
+ property: r'profile',
lower: lower,
includeLower: includeLower,
upper: upper,
@@ -2579,72 +3123,70 @@ extension AlarmModelQueryFilter
});
}
- QueryBuilder
- ownerNameStartsWith(
+ QueryBuilder profileStartsWith(
String value, {
bool caseSensitive = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.startsWith(
- property: r'ownerName',
+ property: r'profile',
value: value,
caseSensitive: caseSensitive,
));
});
}
- QueryBuilder ownerNameEndsWith(
+ QueryBuilder profileEndsWith(
String value, {
bool caseSensitive = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.endsWith(
- property: r'ownerName',
+ property: r'profile',
value: value,
caseSensitive: caseSensitive,
));
});
}
- QueryBuilder ownerNameContains(
+ QueryBuilder profileContains(
String value,
{bool caseSensitive = true}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.contains(
- property: r'ownerName',
+ property: r'profile',
value: value,
caseSensitive: caseSensitive,
));
});
}
- QueryBuilder ownerNameMatches(
+ QueryBuilder profileMatches(
String pattern,
{bool caseSensitive = true}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.matches(
- property: r'ownerName',
+ property: r'profile',
wildcard: pattern,
caseSensitive: caseSensitive,
));
});
}
- QueryBuilder
- ownerNameIsEmpty() {
+ QueryBuilder profileIsEmpty() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
- property: r'ownerName',
+ property: r'profile',
value: '',
));
});
}
QueryBuilder
- ownerNameIsNotEmpty() {
+ profileIsNotEmpty() {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
- property: r'ownerName',
+ property: r'profile',
value: '',
));
});
@@ -2782,6 +3324,16 @@ extension AlarmModelQueryFilter
});
}
+ QueryBuilder ringOnEqualTo(
+ bool value) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'ringOn',
+ value: value,
+ ));
+ });
+ }
+
QueryBuilder
ringtoneNameEqualTo(
String value, {
@@ -3586,6 +4138,18 @@ extension AlarmModelQuerySortBy
});
}
+ QueryBuilder sortByAlarmDate() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'alarmDate', Sort.asc);
+ });
+ }
+
+ QueryBuilder sortByAlarmDateDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'alarmDate', Sort.desc);
+ });
+ }
+
QueryBuilder sortByAlarmID() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'alarmID', Sort.asc);
@@ -3648,6 +4212,30 @@ extension AlarmModelQuerySortBy
});
}
+ QueryBuilder sortByGuardian() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'guardian', Sort.asc);
+ });
+ }
+
+ QueryBuilder sortByGuardianDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'guardian', Sort.desc);
+ });
+ }
+
+ QueryBuilder sortByGuardianTimer() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'guardianTimer', Sort.asc);
+ });
+ }
+
+ QueryBuilder sortByGuardianTimerDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'guardianTimer', Sort.desc);
+ });
+ }
+
QueryBuilder sortByIntervalToAlarm() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'intervalToAlarm', Sort.asc);
@@ -3674,6 +4262,18 @@ extension AlarmModelQuerySortBy
});
}
+ QueryBuilder sortByIsCall() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'isCall', Sort.asc);
+ });
+ }
+
+ QueryBuilder sortByIsCallDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'isCall', Sort.desc);
+ });
+ }
+
QueryBuilder sortByIsEnabled() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'isEnabled', Sort.asc);
@@ -3686,6 +4286,18 @@ extension AlarmModelQuerySortBy
});
}
+ QueryBuilder sortByIsGuardian() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'isGuardian', Sort.asc);
+ });
+ }
+
+ QueryBuilder sortByIsGuardianDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'isGuardian', Sort.desc);
+ });
+ }
+
QueryBuilder sortByIsLocationEnabled() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'isLocationEnabled', Sort.asc);
@@ -3939,6 +4551,18 @@ extension AlarmModelQuerySortBy
});
}
+ QueryBuilder sortByProfile() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'profile', Sort.asc);
+ });
+ }
+
+ QueryBuilder sortByProfileDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'profile', Sort.desc);
+ });
+ }
+
QueryBuilder sortByQrValue() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'qrValue', Sort.asc);
@@ -3951,6 +4575,18 @@ extension AlarmModelQuerySortBy
});
}
+ QueryBuilder sortByRingOn() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'ringOn', Sort.asc);
+ });
+ }
+
+ QueryBuilder sortByRingOnDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'ringOn', Sort.desc);
+ });
+ }
+
QueryBuilder sortByRingtoneName() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'ringtoneName', Sort.asc);
@@ -4055,6 +4691,18 @@ extension AlarmModelQuerySortThenBy
});
}
+ QueryBuilder thenByAlarmDate() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'alarmDate', Sort.asc);
+ });
+ }
+
+ QueryBuilder thenByAlarmDateDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'alarmDate', Sort.desc);
+ });
+ }
+
QueryBuilder thenByAlarmID() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'alarmID', Sort.asc);
@@ -4117,6 +4765,30 @@ extension AlarmModelQuerySortThenBy
});
}
+ QueryBuilder thenByGuardian() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'guardian', Sort.asc);
+ });
+ }
+
+ QueryBuilder thenByGuardianDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'guardian', Sort.desc);
+ });
+ }
+
+ QueryBuilder thenByGuardianTimer() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'guardianTimer', Sort.asc);
+ });
+ }
+
+ QueryBuilder thenByGuardianTimerDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'guardianTimer', Sort.desc);
+ });
+ }
+
QueryBuilder thenByIntervalToAlarm() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'intervalToAlarm', Sort.asc);
@@ -4143,6 +4815,18 @@ extension AlarmModelQuerySortThenBy
});
}
+ QueryBuilder thenByIsCall() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'isCall', Sort.asc);
+ });
+ }
+
+ QueryBuilder thenByIsCallDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'isCall', Sort.desc);
+ });
+ }
+
QueryBuilder thenByIsEnabled() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'isEnabled', Sort.asc);
@@ -4155,6 +4839,18 @@ extension AlarmModelQuerySortThenBy
});
}
+ QueryBuilder thenByIsGuardian() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'isGuardian', Sort.asc);
+ });
+ }
+
+ QueryBuilder thenByIsGuardianDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'isGuardian', Sort.desc);
+ });
+ }
+
QueryBuilder thenByIsLocationEnabled() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'isLocationEnabled', Sort.asc);
@@ -4420,6 +5116,18 @@ extension AlarmModelQuerySortThenBy
});
}
+ QueryBuilder thenByProfile() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'profile', Sort.asc);
+ });
+ }
+
+ QueryBuilder thenByProfileDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'profile', Sort.desc);
+ });
+ }
+
QueryBuilder thenByQrValue() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'qrValue', Sort.asc);
@@ -4432,6 +5140,18 @@ extension AlarmModelQuerySortThenBy
});
}
+ QueryBuilder thenByRingOn() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'ringOn', Sort.asc);
+ });
+ }
+
+ QueryBuilder thenByRingOnDesc() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addSortBy(r'ringOn', Sort.desc);
+ });
+ }
+
QueryBuilder thenByRingtoneName() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'ringtoneName', Sort.asc);
@@ -4522,6 +5242,13 @@ extension AlarmModelQueryWhereDistinct
});
}
+ QueryBuilder distinctByAlarmDate(
+ {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addDistinctBy(r'alarmDate', caseSensitive: caseSensitive);
+ });
+ }
+
QueryBuilder distinctByAlarmID(
{bool caseSensitive = true}) {
return QueryBuilder.apply(this, (query) {
@@ -4562,6 +5289,19 @@ extension AlarmModelQueryWhereDistinct
});
}
+ QueryBuilder distinctByGuardian(
+ {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addDistinctBy(r'guardian', caseSensitive: caseSensitive);
+ });
+ }
+
+ QueryBuilder distinctByGuardianTimer() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addDistinctBy(r'guardianTimer');
+ });
+ }
+
QueryBuilder distinctByIntervalToAlarm() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'intervalToAlarm');
@@ -4575,12 +5315,24 @@ extension AlarmModelQueryWhereDistinct
});
}
+ QueryBuilder distinctByIsCall() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addDistinctBy(r'isCall');
+ });
+ }
+
QueryBuilder distinctByIsEnabled() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'isEnabled');
});
}
+ QueryBuilder distinctByIsGuardian() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addDistinctBy(r'isGuardian');
+ });
+ }
+
QueryBuilder
distinctByIsLocationEnabled() {
return QueryBuilder.apply(this, (query) {
@@ -4715,6 +5467,13 @@ extension AlarmModelQueryWhereDistinct
});
}
+ QueryBuilder distinctByProfile(
+ {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addDistinctBy(r'profile', caseSensitive: caseSensitive);
+ });
+ }
+
QueryBuilder distinctByQrValue(
{bool caseSensitive = true}) {
return QueryBuilder.apply(this, (query) {
@@ -4722,6 +5481,12 @@ extension AlarmModelQueryWhereDistinct
});
}
+ QueryBuilder distinctByRingOn() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addDistinctBy(r'ringOn');
+ });
+ }
+
QueryBuilder distinctByRingtoneName(
{bool caseSensitive = true}) {
return QueryBuilder.apply(this, (query) {
@@ -4793,6 +5558,12 @@ extension AlarmModelQueryProperty
});
}
+ QueryBuilder alarmDateProperty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addPropertyName(r'alarmDate');
+ });
+ }
+
QueryBuilder alarmIDProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'alarmID');
@@ -4830,6 +5601,18 @@ extension AlarmModelQueryProperty
});
}
+ QueryBuilder guardianProperty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addPropertyName(r'guardian');
+ });
+ }
+
+ QueryBuilder guardianTimerProperty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addPropertyName(r'guardianTimer');
+ });
+ }
+
QueryBuilder intervalToAlarmProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'intervalToAlarm');
@@ -4842,12 +5625,24 @@ extension AlarmModelQueryProperty
});
}
+ QueryBuilder isCallProperty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addPropertyName(r'isCall');
+ });
+ }
+
QueryBuilder isEnabledProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'isEnabled');
});
}
+ QueryBuilder isGuardianProperty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addPropertyName(r'isGuardian');
+ });
+ }
+
QueryBuilder isLocationEnabledProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'isLocationEnabled');
@@ -4972,12 +5767,24 @@ extension AlarmModelQueryProperty
});
}
+ QueryBuilder profileProperty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addPropertyName(r'profile');
+ });
+ }
+
QueryBuilder qrValueProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'qrValue');
});
}
+ QueryBuilder ringOnProperty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addPropertyName(r'ringOn');
+ });
+ }
+
QueryBuilder ringtoneNameProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'ringtoneName');
diff --git a/lib/app/data/models/profile_model.dart b/lib/app/data/models/profile_model.dart
new file mode 100644
index 00000000..04a6b89b
--- /dev/null
+++ b/lib/app/data/models/profile_model.dart
@@ -0,0 +1,315 @@
+import 'dart:convert';
+
+import 'package:cloud_firestore/cloud_firestore.dart' as firestore;
+
+import 'package:isar/isar.dart';
+import 'package:ultimate_alarm_clock/app/data/models/user_model.dart';
+import 'package:ultimate_alarm_clock/app/utils/utils.dart';
+part 'profile_model.g.dart';
+
+@collection
+class ProfileModel {
+ Id isarId = Isar.autoIncrement;
+ late String profileName;
+ String? firestoreId;
+ late bool isEnabled;
+ late bool isLocationEnabled;
+ late bool isSharedAlarmEnabled;
+ late bool isWeatherEnabled;
+ late bool isMathsEnabled;
+ late bool isShakeEnabled;
+ late bool isQrEnabled;
+ late bool isPedometerEnabled;
+ late int intervalToAlarm;
+ late bool isActivityEnabled;
+ late String location;
+ late int activityInterval;
+ late int minutesSinceMidnight;
+ late List days;
+ late List weatherTypes;
+ late int shakeTimes;
+ late int numberOfSteps;
+ late int numMathsQuestions;
+ late int mathsDifficulty;
+ late String qrValue;
+ List? sharedUserIds;
+ late String ownerId;
+ late String ownerName;
+ late String lastEditedUserId;
+ late bool mutexLock;
+ late String label;
+ late bool isOneTime;
+ late int snoozeDuration;
+ late int gradient;
+ late String ringtoneName;
+ late String note;
+ late bool deleteAfterGoesOff;
+ late bool showMotivationalQuote;
+ late double volMax;
+ late double volMin;
+ late String alarmDate;
+ late bool ringOn;
+ late int activityMonitor;
+ late bool isGuardian;
+ late int guardianTimer;
+ late String guardian;
+ late bool isCall;
+ @ignore
+ Map? offsetDetails;
+
+ ProfileModel(
+ {required this.profileName,
+ this.sharedUserIds = const [],
+ required this.ownerId,
+ required this.ownerName,
+ required this.lastEditedUserId,
+ required this.mutexLock,
+ this.isEnabled = true,
+ required this.days,
+ required this.intervalToAlarm,
+ required this.isActivityEnabled,
+ required this.minutesSinceMidnight,
+ required this.isLocationEnabled,
+ required this.isSharedAlarmEnabled,
+ required this.isWeatherEnabled,
+ required this.location,
+ required this.weatherTypes,
+ required this.isMathsEnabled,
+ required this.mathsDifficulty,
+ required this.numMathsQuestions,
+ required this.isShakeEnabled,
+ required this.shakeTimes,
+ required this.isQrEnabled,
+ required this.qrValue,
+ required this.isPedometerEnabled,
+ required this.numberOfSteps,
+ required this.activityInterval,
+ this.offsetDetails = const {},
+ required this.label,
+ required this.isOneTime,
+ required this.snoozeDuration,
+ required this.gradient,
+ required this.ringtoneName,
+ required this.note,
+ required this.deleteAfterGoesOff,
+ required this.showMotivationalQuote,
+ required this.volMax,
+ required this.volMin,
+ required this.activityMonitor,
+ required this.alarmDate,
+ required this.ringOn,
+ required this.isGuardian,
+ required this.guardianTimer,
+ required this.guardian,
+ required this.isCall});
+
+ ProfileModel.fromDocumentSnapshot({
+ required firestore.DocumentSnapshot documentSnapshot,
+ required UserModel? user,
+ }) {
+ // Making sure the profiles work with the offsets
+ isSharedAlarmEnabled = documentSnapshot['isSharedAlarmEnabled'];
+ offsetDetails = documentSnapshot['offsetDetails'];
+
+ if (isSharedAlarmEnabled && user != null) {
+ // Using offsetted time only if it is enabled
+
+ minutesSinceMidnight = Utils.timeOfDayToInt(
+ Utils.stringToTimeOfDay(offsetDetails![user.id]['offsettedTime']),
+ );
+ } else {
+ minutesSinceMidnight = documentSnapshot['minutesSinceMidnight'];
+ }
+ snoozeDuration = documentSnapshot['snoozeDuration'];
+ gradient = documentSnapshot['gradient'];
+ label = documentSnapshot['label'];
+ isOneTime = documentSnapshot['isOneTime'];
+ firestoreId = documentSnapshot.id;
+ sharedUserIds = List.from(documentSnapshot['sharedUserIds']);
+ lastEditedUserId = documentSnapshot['lastEditedUserId'];
+ mutexLock = documentSnapshot['mutexLock'];
+ ownerId = documentSnapshot['ownerId'];
+ ownerName = documentSnapshot['ownerName'];
+ days = List.from(documentSnapshot['days']);
+ isEnabled = documentSnapshot['isEnabled'];
+ intervalToAlarm = documentSnapshot['intervalToAlarm'];
+ isActivityEnabled = documentSnapshot['isActivityEnabled'];
+ activityInterval = documentSnapshot['activityInterval'];
+
+ isLocationEnabled = documentSnapshot['isLocationEnabled'];
+ isWeatherEnabled = documentSnapshot['isWeatherEnabled'];
+ weatherTypes = List.from(documentSnapshot['weatherTypes']);
+ location = documentSnapshot['location'];
+ isMathsEnabled = documentSnapshot['isMathsEnabled'];
+ mathsDifficulty = documentSnapshot['mathsDifficulty'];
+ numMathsQuestions = documentSnapshot['numMathsQuestions'];
+ isQrEnabled = documentSnapshot['isQrEnabled'];
+ qrValue = documentSnapshot['qrValue'];
+ isShakeEnabled = documentSnapshot['isShakeEnabled'];
+ shakeTimes = documentSnapshot['shakeTimes'];
+ isPedometerEnabled = documentSnapshot['isPedometerEnabled'];
+ numberOfSteps = documentSnapshot['numberOfSteps'];
+ ringtoneName = documentSnapshot['ringtoneName'];
+ note = documentSnapshot['note'];
+ deleteAfterGoesOff = documentSnapshot['deleteAfterGoesOff'];
+ showMotivationalQuote = documentSnapshot['showMotivationalQuote'];
+
+ volMax = documentSnapshot['volMax'];
+ volMin = documentSnapshot['volMin'];
+
+ activityMonitor = documentSnapshot['activityMonitor'];
+
+ alarmDate = documentSnapshot['alarmDate'];
+ isGuardian = documentSnapshot['isGuardian'];
+ guardianTimer = documentSnapshot['guardianTimer'];
+ guardian = documentSnapshot['guardian'];
+ isGuardian = documentSnapshot['isGuardian'];
+ guardianTimer = documentSnapshot['guardianTimer'];
+ guardian = documentSnapshot['guardian'];
+ isCall = documentSnapshot['isCall'];
+ }
+
+ ProfileModel.fromMap(Map profileData) {
+ // Making sure the profiles work with the offsets
+ profileName = profileData['profileName'];
+ snoozeDuration = profileData['snoozeDuration'];
+ gradient = profileData['gradient'];
+ isSharedAlarmEnabled = profileData['isSharedAlarmEnabled'];
+ minutesSinceMidnight = profileData['minutesSinceMidnight'];
+ firestoreId = profileData['firestoreId'];
+ sharedUserIds = List.from(profileData['sharedUserIds']);
+ lastEditedUserId = profileData['lastEditedUserId'];
+ mutexLock = profileData['mutexLock'];
+ ownerId = profileData['ownerId'];
+ ownerName = profileData['ownerName'];
+ days = List.from(profileData['days']);
+ isEnabled = profileData['isEnabled'];
+ intervalToAlarm = profileData['intervalToAlarm'];
+ isActivityEnabled = profileData['isActivityEnabled'];
+ isWeatherEnabled = profileData['isWeatherEnabled'];
+ weatherTypes = List.from(profileData['weatherTypes']);
+
+ activityInterval = profileData['activityInterval'];
+ isLocationEnabled = profileData['isLocationEnabled'];
+ isSharedAlarmEnabled = profileData['isSharedAlarmEnabled'];
+ location = profileData['location'];
+
+ isMathsEnabled = profileData['isMathsEnabled'];
+ mathsDifficulty = profileData['mathsDifficulty'];
+ numMathsQuestions = profileData['numMathsQuestions'];
+ isQrEnabled = profileData['isQrEnabled'];
+ qrValue = profileData['qrValue'];
+ isShakeEnabled = profileData['isShakeEnabled'];
+ shakeTimes = profileData['shakeTimes'];
+ isPedometerEnabled = profileData['isPedometerEnabled'];
+ numberOfSteps = profileData['numberOfSteps'];
+ label = profileData['label'];
+ isOneTime = profileData['isOneTime'];
+ ringtoneName = profileData['ringtoneName'];
+ note = profileData['note'];
+ deleteAfterGoesOff = profileData['deleteAfterGoesOff'];
+ showMotivationalQuote = profileData['showMotivationalQuote'];
+
+ volMin = profileData['volMin'];
+ volMax = profileData['volMax'];
+ activityMonitor = profileData['activityMonitor'];
+ alarmDate = profileData['alarmDate'];
+ isGuardian = profileData['isGuardian'];
+ guardianTimer = profileData['guardianTimer'];
+ guardian = profileData['guardian'];
+ isCall = profileData['isCall'];
+ ringOn = profileData['ringOn'];
+ }
+
+ ProfileModel.fromJson(String profileData, UserModel? user) {
+ ProfileModel.fromMap(jsonDecode(profileData));
+ }
+
+ static String toJson(ProfileModel profileRecord) {
+ return jsonEncode(ProfileModel.toMap(profileRecord));
+ }
+
+ static Map toMap(ProfileModel profileRecord) {
+ final profileMap = {
+ 'profileName': profileRecord.profileName,
+ 'firestoreId': profileRecord.firestoreId,
+ 'ownerId': profileRecord.ownerId,
+ 'lastEditedUserId': profileRecord.lastEditedUserId,
+ 'mutexLock': profileRecord.mutexLock,
+ 'isOneTime': profileRecord.isOneTime,
+ 'label': profileRecord.label,
+ 'ownerName': profileRecord.ownerName,
+ 'sharedUserIds': profileRecord.sharedUserIds,
+ 'days': profileRecord.days,
+ 'intervalToAlarm': profileRecord.intervalToAlarm,
+ 'isEnabled': profileRecord.isEnabled,
+ 'isActivityEnabled': profileRecord.isActivityEnabled,
+ 'weatherTypes': profileRecord.weatherTypes,
+ 'isWeatherEnabled': profileRecord.isWeatherEnabled,
+ 'activityInterval': profileRecord.activityInterval,
+ 'minutesSinceMidnight': profileRecord.minutesSinceMidnight,
+ 'isLocationEnabled': profileRecord.isLocationEnabled,
+ 'location': profileRecord.location,
+ 'isSharedAlarmEnabled': profileRecord.isSharedAlarmEnabled,
+ 'isMathsEnabled': profileRecord.isMathsEnabled,
+ 'mathsDifficulty': profileRecord.mathsDifficulty,
+ 'numMathsQuestions': profileRecord.numMathsQuestions,
+ 'isQrEnabled': profileRecord.isQrEnabled,
+ 'qrValue': profileRecord.qrValue,
+ 'isShakeEnabled': profileRecord.isShakeEnabled,
+ 'shakeTimes': profileRecord.shakeTimes,
+ 'isPedometerEnabled': profileRecord.isPedometerEnabled,
+ 'numberOfSteps': profileRecord.numberOfSteps,
+ 'snoozeDuration': profileRecord.snoozeDuration,
+ 'gradient': profileRecord.gradient,
+ 'ringtoneName': profileRecord.ringtoneName,
+ 'note': profileRecord.note,
+ 'deleteAfterGoesOff': profileRecord.deleteAfterGoesOff,
+ 'showMotivationalQuote': profileRecord.showMotivationalQuote,
+ 'volMin': profileRecord.volMin,
+ 'volMax': profileRecord.volMax,
+ 'activityMonitor': profileRecord.activityMonitor,
+ 'alarmDate': profileRecord.alarmDate,
+ 'isGuardian': profileRecord.isGuardian,
+ 'guardianTimer': profileRecord.guardianTimer,
+ 'guardian': profileRecord.guardian,
+ 'isCall': profileRecord.isCall,
+ 'ringOn': profileRecord.ringOn
+ };
+
+ if (profileRecord.isSharedAlarmEnabled) {
+ profileMap['offsetDetails'] = profileRecord.offsetDetails;
+ }
+ return profileMap;
+ }
+
+ String boolListToString(List boolList) {
+ // Rotate the list to start with Sunday
+ var rotatedList =
+ [boolList.last] + boolList.sublist(0, boolList.length - 1);
+ // Convert the list of bools to a string of 1s and 0s
+ return rotatedList.map((b) => b ? '1' : '0').join();
+ }
+
+ List stringToBoolList(String s) {
+ // Rotate the string to start with Monday
+ final rotatedString = s.substring(1) + s[0];
+ // Convert the rotated string to a list of boolean values
+ return rotatedString.split('').map((c) => c == '1').toList();
+ }
+}
+
+int fastHash(String string) {
+ var hash = 0xcbf29ce484222325;
+
+ var i = 0;
+ while (i < string.length) {
+ final codeUnit = string.codeUnitAt(i++);
+ hash ^= codeUnit >> 8;
+ hash *= 0x100000001b3;
+ hash ^= codeUnit & 0xFF;
+ hash *= 0x100000001b3;
+ }
+
+ return hash;
+}
diff --git a/lib/app/data/models/profile_model.g.dart b/lib/app/data/models/profile_model.g.dart
new file mode 100644
index 00000000..48e7a8c7
--- /dev/null
+++ b/lib/app/data/models/profile_model.g.dart
@@ -0,0 +1,5366 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'profile_model.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 GetProfileModelCollection on Isar {
+ IsarCollection get profileModels => this.collection();
+}
+
+const ProfileModelSchema = CollectionSchema(
+ name: r'ProfileModel',
+ id: 7663001939508120177,
+ properties: {
+ r'activityInterval': PropertySchema(
+ id: 0,
+ name: r'activityInterval',
+ type: IsarType.long,
+ ),
+ r'activityMonitor': PropertySchema(
+ id: 1,
+ name: r'activityMonitor',
+ type: IsarType.long,
+ ),
+ r'alarmDate': PropertySchema(
+ id: 2,
+ name: r'alarmDate',
+ type: IsarType.string,
+ ),
+ r'days': PropertySchema(
+ id: 3,
+ name: r'days',
+ type: IsarType.boolList,
+ ),
+ r'deleteAfterGoesOff': PropertySchema(
+ id: 4,
+ name: r'deleteAfterGoesOff',
+ type: IsarType.bool,
+ ),
+ r'firestoreId': PropertySchema(
+ id: 5,
+ name: r'firestoreId',
+ type: IsarType.string,
+ ),
+ r'gradient': PropertySchema(
+ id: 6,
+ name: r'gradient',
+ type: IsarType.long,
+ ),
+ r'guardian': PropertySchema(
+ id: 7,
+ name: r'guardian',
+ type: IsarType.string,
+ ),
+ r'guardianTimer': PropertySchema(
+ id: 8,
+ name: r'guardianTimer',
+ type: IsarType.long,
+ ),
+ r'intervalToAlarm': PropertySchema(
+ id: 9,
+ name: r'intervalToAlarm',
+ type: IsarType.long,
+ ),
+ r'isActivityEnabled': PropertySchema(
+ id: 10,
+ name: r'isActivityEnabled',
+ type: IsarType.bool,
+ ),
+ r'isCall': PropertySchema(
+ id: 11,
+ name: r'isCall',
+ type: IsarType.bool,
+ ),
+ r'isEnabled': PropertySchema(
+ id: 12,
+ name: r'isEnabled',
+ type: IsarType.bool,
+ ),
+ r'isGuardian': PropertySchema(
+ id: 13,
+ name: r'isGuardian',
+ type: IsarType.bool,
+ ),
+ r'isLocationEnabled': PropertySchema(
+ id: 14,
+ name: r'isLocationEnabled',
+ type: IsarType.bool,
+ ),
+ r'isMathsEnabled': PropertySchema(
+ id: 15,
+ name: r'isMathsEnabled',
+ type: IsarType.bool,
+ ),
+ r'isOneTime': PropertySchema(
+ id: 16,
+ name: r'isOneTime',
+ type: IsarType.bool,
+ ),
+ r'isPedometerEnabled': PropertySchema(
+ id: 17,
+ name: r'isPedometerEnabled',
+ type: IsarType.bool,
+ ),
+ r'isQrEnabled': PropertySchema(
+ id: 18,
+ name: r'isQrEnabled',
+ type: IsarType.bool,
+ ),
+ r'isShakeEnabled': PropertySchema(
+ id: 19,
+ name: r'isShakeEnabled',
+ type: IsarType.bool,
+ ),
+ r'isSharedAlarmEnabled': PropertySchema(
+ id: 20,
+ name: r'isSharedAlarmEnabled',
+ type: IsarType.bool,
+ ),
+ r'isWeatherEnabled': PropertySchema(
+ id: 21,
+ name: r'isWeatherEnabled',
+ type: IsarType.bool,
+ ),
+ r'label': PropertySchema(
+ id: 22,
+ name: r'label',
+ type: IsarType.string,
+ ),
+ r'lastEditedUserId': PropertySchema(
+ id: 23,
+ name: r'lastEditedUserId',
+ type: IsarType.string,
+ ),
+ r'location': PropertySchema(
+ id: 24,
+ name: r'location',
+ type: IsarType.string,
+ ),
+ r'mathsDifficulty': PropertySchema(
+ id: 25,
+ name: r'mathsDifficulty',
+ type: IsarType.long,
+ ),
+ r'minutesSinceMidnight': PropertySchema(
+ id: 26,
+ name: r'minutesSinceMidnight',
+ type: IsarType.long,
+ ),
+ r'mutexLock': PropertySchema(
+ id: 27,
+ name: r'mutexLock',
+ type: IsarType.bool,
+ ),
+ r'note': PropertySchema(
+ id: 28,
+ name: r'note',
+ type: IsarType.string,
+ ),
+ r'numMathsQuestions': PropertySchema(
+ id: 29,
+ name: r'numMathsQuestions',
+ type: IsarType.long,
+ ),
+ r'numberOfSteps': PropertySchema(
+ id: 30,
+ name: r'numberOfSteps',
+ type: IsarType.long,
+ ),
+ r'ownerId': PropertySchema(
+ id: 31,
+ name: r'ownerId',
+ type: IsarType.string,
+ ),
+ r'ownerName': PropertySchema(
+ id: 32,
+ name: r'ownerName',
+ type: IsarType.string,
+ ),
+ r'profileName': PropertySchema(
+ id: 33,
+ name: r'profileName',
+ type: IsarType.string,
+ ),
+ r'qrValue': PropertySchema(
+ id: 34,
+ name: r'qrValue',
+ type: IsarType.string,
+ ),
+ r'ringOn': PropertySchema(
+ id: 35,
+ name: r'ringOn',
+ type: IsarType.bool,
+ ),
+ r'ringtoneName': PropertySchema(
+ id: 36,
+ name: r'ringtoneName',
+ type: IsarType.string,
+ ),
+ r'shakeTimes': PropertySchema(
+ id: 37,
+ name: r'shakeTimes',
+ type: IsarType.long,
+ ),
+ r'sharedUserIds': PropertySchema(
+ id: 38,
+ name: r'sharedUserIds',
+ type: IsarType.stringList,
+ ),
+ r'showMotivationalQuote': PropertySchema(
+ id: 39,
+ name: r'showMotivationalQuote',
+ type: IsarType.bool,
+ ),
+ r'snoozeDuration': PropertySchema(
+ id: 40,
+ name: r'snoozeDuration',
+ type: IsarType.long,
+ ),
+ r'volMax': PropertySchema(
+ id: 41,
+ name: r'volMax',
+ type: IsarType.double,
+ ),
+ r'volMin': PropertySchema(
+ id: 42,
+ name: r'volMin',
+ type: IsarType.double,
+ ),
+ r'weatherTypes': PropertySchema(
+ id: 43,
+ name: r'weatherTypes',
+ type: IsarType.longList,
+ )
+ },
+ estimateSize: _profileModelEstimateSize,
+ serialize: _profileModelSerialize,
+ deserialize: _profileModelDeserialize,
+ deserializeProp: _profileModelDeserializeProp,
+ idName: r'isarId',
+ indexes: {},
+ links: {},
+ embeddedSchemas: {},
+ getId: _profileModelGetId,
+ getLinks: _profileModelGetLinks,
+ attach: _profileModelAttach,
+ version: '3.1.0+1',
+);
+
+int _profileModelEstimateSize(
+ ProfileModel object,
+ List offsets,
+ Map> allOffsets,
+) {
+ var bytesCount = offsets.last;
+ bytesCount += 3 + object.alarmDate.length * 3;
+ bytesCount += 3 + object.days.length;
+ {
+ final value = object.firestoreId;
+ if (value != null) {
+ bytesCount += 3 + value.length * 3;
+ }
+ }
+ bytesCount += 3 + object.guardian.length * 3;
+ bytesCount += 3 + object.label.length * 3;
+ bytesCount += 3 + object.lastEditedUserId.length * 3;
+ bytesCount += 3 + object.location.length * 3;
+ bytesCount += 3 + object.note.length * 3;
+ bytesCount += 3 + object.ownerId.length * 3;
+ bytesCount += 3 + object.ownerName.length * 3;
+ bytesCount += 3 + object.profileName.length * 3;
+ bytesCount += 3 + object.qrValue.length * 3;
+ bytesCount += 3 + object.ringtoneName.length * 3;
+ {
+ final list = object.sharedUserIds;
+ if (list != null) {
+ bytesCount += 3 + list.length * 3;
+ {
+ for (var i = 0; i < list.length; i++) {
+ final value = list[i];
+ bytesCount += value.length * 3;
+ }
+ }
+ }
+ }
+ bytesCount += 3 + object.weatherTypes.length * 8;
+ return bytesCount;
+}
+
+void _profileModelSerialize(
+ ProfileModel object,
+ IsarWriter writer,
+ List offsets,
+ Map> allOffsets,
+) {
+ writer.writeLong(offsets[0], object.activityInterval);
+ writer.writeLong(offsets[1], object.activityMonitor);
+ writer.writeString(offsets[2], object.alarmDate);
+ writer.writeBoolList(offsets[3], object.days);
+ writer.writeBool(offsets[4], object.deleteAfterGoesOff);
+ writer.writeString(offsets[5], object.firestoreId);
+ writer.writeLong(offsets[6], object.gradient);
+ writer.writeString(offsets[7], object.guardian);
+ writer.writeLong(offsets[8], object.guardianTimer);
+ writer.writeLong(offsets[9], object.intervalToAlarm);
+ writer.writeBool(offsets[10], object.isActivityEnabled);
+ writer.writeBool(offsets[11], object.isCall);
+ writer.writeBool(offsets[12], object.isEnabled);
+ writer.writeBool(offsets[13], object.isGuardian);
+ writer.writeBool(offsets[14], object.isLocationEnabled);
+ writer.writeBool(offsets[15], object.isMathsEnabled);
+ writer.writeBool(offsets[16], object.isOneTime);
+ writer.writeBool(offsets[17], object.isPedometerEnabled);
+ writer.writeBool(offsets[18], object.isQrEnabled);
+ writer.writeBool(offsets[19], object.isShakeEnabled);
+ writer.writeBool(offsets[20], object.isSharedAlarmEnabled);
+ writer.writeBool(offsets[21], object.isWeatherEnabled);
+ writer.writeString(offsets[22], object.label);
+ writer.writeString(offsets[23], object.lastEditedUserId);
+ writer.writeString(offsets[24], object.location);
+ writer.writeLong(offsets[25], object.mathsDifficulty);
+ writer.writeLong(offsets[26], object.minutesSinceMidnight);
+ writer.writeBool(offsets[27], object.mutexLock);
+ writer.writeString(offsets[28], object.note);
+ writer.writeLong(offsets[29], object.numMathsQuestions);
+ writer.writeLong(offsets[30], object.numberOfSteps);
+ writer.writeString(offsets[31], object.ownerId);
+ writer.writeString(offsets[32], object.ownerName);
+ writer.writeString(offsets[33], object.profileName);
+ writer.writeString(offsets[34], object.qrValue);
+ writer.writeBool(offsets[35], object.ringOn);
+ writer.writeString(offsets[36], object.ringtoneName);
+ writer.writeLong(offsets[37], object.shakeTimes);
+ writer.writeStringList(offsets[38], object.sharedUserIds);
+ writer.writeBool(offsets[39], object.showMotivationalQuote);
+ writer.writeLong(offsets[40], object.snoozeDuration);
+ writer.writeDouble(offsets[41], object.volMax);
+ writer.writeDouble(offsets[42], object.volMin);
+ writer.writeLongList(offsets[43], object.weatherTypes);
+}
+
+ProfileModel _profileModelDeserialize(
+ Id id,
+ IsarReader reader,
+ List offsets,
+ Map> allOffsets,
+) {
+ final object = ProfileModel(
+ activityInterval: reader.readLong(offsets[0]),
+ activityMonitor: reader.readLong(offsets[1]),
+ alarmDate: reader.readString(offsets[2]),
+ days: reader.readBoolList(offsets[3]) ?? [],
+ deleteAfterGoesOff: reader.readBool(offsets[4]),
+ gradient: reader.readLong(offsets[6]),
+ guardian: reader.readString(offsets[7]),
+ guardianTimer: reader.readLong(offsets[8]),
+ intervalToAlarm: reader.readLong(offsets[9]),
+ isActivityEnabled: reader.readBool(offsets[10]),
+ isCall: reader.readBool(offsets[11]),
+ isEnabled: reader.readBoolOrNull(offsets[12]) ?? true,
+ isGuardian: reader.readBool(offsets[13]),
+ isLocationEnabled: reader.readBool(offsets[14]),
+ isMathsEnabled: reader.readBool(offsets[15]),
+ isOneTime: reader.readBool(offsets[16]),
+ isPedometerEnabled: reader.readBool(offsets[17]),
+ isQrEnabled: reader.readBool(offsets[18]),
+ isShakeEnabled: reader.readBool(offsets[19]),
+ isSharedAlarmEnabled: reader.readBool(offsets[20]),
+ isWeatherEnabled: reader.readBool(offsets[21]),
+ label: reader.readString(offsets[22]),
+ lastEditedUserId: reader.readString(offsets[23]),
+ location: reader.readString(offsets[24]),
+ mathsDifficulty: reader.readLong(offsets[25]),
+ minutesSinceMidnight: reader.readLong(offsets[26]),
+ mutexLock: reader.readBool(offsets[27]),
+ note: reader.readString(offsets[28]),
+ numMathsQuestions: reader.readLong(offsets[29]),
+ numberOfSteps: reader.readLong(offsets[30]),
+ ownerId: reader.readString(offsets[31]),
+ ownerName: reader.readString(offsets[32]),
+ profileName: reader.readString(offsets[33]),
+ qrValue: reader.readString(offsets[34]),
+ ringOn: reader.readBool(offsets[35]),
+ ringtoneName: reader.readString(offsets[36]),
+ shakeTimes: reader.readLong(offsets[37]),
+ sharedUserIds: reader.readStringList(offsets[38]),
+ showMotivationalQuote: reader.readBool(offsets[39]),
+ snoozeDuration: reader.readLong(offsets[40]),
+ volMax: reader.readDouble(offsets[41]),
+ volMin: reader.readDouble(offsets[42]),
+ weatherTypes: reader.readLongList(offsets[43]) ?? [],
+ );
+ object.firestoreId = reader.readStringOrNull(offsets[5]);
+ object.isarId = id;
+ return object;
+}
+
+P _profileModelDeserializeProp(
+ IsarReader reader,
+ int propertyId,
+ int offset,
+ Map> 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;
+ case 3:
+ return (reader.readBoolList(offset) ?? []) as P;
+ case 4:
+ return (reader.readBool(offset)) as P;
+ case 5:
+ return (reader.readStringOrNull(offset)) as P;
+ case 6:
+ return (reader.readLong(offset)) as P;
+ case 7:
+ return (reader.readString(offset)) as P;
+ case 8:
+ return (reader.readLong(offset)) as P;
+ case 9:
+ return (reader.readLong(offset)) as P;
+ case 10:
+ return (reader.readBool(offset)) as P;
+ case 11:
+ return (reader.readBool(offset)) as P;
+ case 12:
+ return (reader.readBoolOrNull(offset) ?? true) as P;
+ case 13:
+ return (reader.readBool(offset)) as P;
+ case 14:
+ return (reader.readBool(offset)) as P;
+ case 15:
+ return (reader.readBool(offset)) as P;
+ case 16:
+ return (reader.readBool(offset)) as P;
+ case 17:
+ return (reader.readBool(offset)) as P;
+ case 18:
+ return (reader.readBool(offset)) as P;
+ case 19:
+ return (reader.readBool(offset)) as P;
+ case 20:
+ return (reader.readBool(offset)) as P;
+ case 21:
+ return (reader.readBool(offset)) as P;
+ case 22:
+ return (reader.readString(offset)) as P;
+ case 23:
+ return (reader.readString(offset)) as P;
+ case 24:
+ return (reader.readString(offset)) as P;
+ case 25:
+ return (reader.readLong(offset)) as P;
+ case 26:
+ return (reader.readLong(offset)) as P;
+ case 27:
+ return (reader.readBool(offset)) as P;
+ case 28:
+ return (reader.readString(offset)) as P;
+ case 29:
+ return (reader.readLong(offset)) as P;
+ case 30:
+ return (reader.readLong(offset)) as P;
+ case 31:
+ return (reader.readString(offset)) as P;
+ case 32:
+ return (reader.readString(offset)) as P;
+ case 33:
+ return (reader.readString(offset)) as P;
+ case 34:
+ return (reader.readString(offset)) as P;
+ case 35:
+ return (reader.readBool(offset)) as P;
+ case 36:
+ return (reader.readString(offset)) as P;
+ case 37:
+ return (reader.readLong(offset)) as P;
+ case 38:
+ return (reader.readStringList(offset)) as P;
+ case 39:
+ return (reader.readBool(offset)) as P;
+ case 40:
+ return (reader.readLong(offset)) as P;
+ case 41:
+ return (reader.readDouble(offset)) as P;
+ case 42:
+ return (reader.readDouble(offset)) as P;
+ case 43:
+ return (reader.readLongList(offset) ?? []) as P;
+ default:
+ throw IsarError('Unknown property with id $propertyId');
+ }
+}
+
+Id _profileModelGetId(ProfileModel object) {
+ return object.isarId;
+}
+
+List> _profileModelGetLinks(ProfileModel object) {
+ return [];
+}
+
+void _profileModelAttach(
+ IsarCollection col, Id id, ProfileModel object) {
+ object.isarId = id;
+}
+
+extension ProfileModelQueryWhereSort
+ on QueryBuilder {
+ QueryBuilder anyIsarId() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addWhereClause(const IdWhereClause.any());
+ });
+ }
+}
+
+extension ProfileModelQueryWhere
+ on QueryBuilder {
+ QueryBuilder isarIdEqualTo(
+ Id isarId) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addWhereClause(IdWhereClause.between(
+ lower: isarId,
+ upper: isarId,
+ ));
+ });
+ }
+
+ QueryBuilder isarIdNotEqualTo(
+ Id isarId) {
+ return QueryBuilder.apply(this, (query) {
+ if (query.whereSort == Sort.asc) {
+ return query
+ .addWhereClause(
+ IdWhereClause.lessThan(upper: isarId, includeUpper: false),
+ )
+ .addWhereClause(
+ IdWhereClause.greaterThan(lower: isarId, includeLower: false),
+ );
+ } else {
+ return query
+ .addWhereClause(
+ IdWhereClause.greaterThan(lower: isarId, includeLower: false),
+ )
+ .addWhereClause(
+ IdWhereClause.lessThan(upper: isarId, includeUpper: false),
+ );
+ }
+ });
+ }
+
+ QueryBuilder isarIdGreaterThan(
+ Id isarId,
+ {bool include = false}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addWhereClause(
+ IdWhereClause.greaterThan(lower: isarId, includeLower: include),
+ );
+ });
+ }
+
+ QueryBuilder isarIdLessThan(
+ Id isarId,
+ {bool include = false}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addWhereClause(
+ IdWhereClause.lessThan(upper: isarId, includeUpper: include),
+ );
+ });
+ }
+
+ QueryBuilder isarIdBetween(
+ Id lowerIsarId,
+ Id upperIsarId, {
+ bool includeLower = true,
+ bool includeUpper = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addWhereClause(IdWhereClause.between(
+ lower: lowerIsarId,
+ includeLower: includeLower,
+ upper: upperIsarId,
+ includeUpper: includeUpper,
+ ));
+ });
+ }
+}
+
+extension ProfileModelQueryFilter
+ on QueryBuilder {
+ QueryBuilder
+ activityIntervalEqualTo(int value) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'activityInterval',
+ value: value,
+ ));
+ });
+ }
+
+ QueryBuilder
+ activityIntervalGreaterThan(
+ int value, {
+ bool include = false,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.greaterThan(
+ include: include,
+ property: r'activityInterval',
+ value: value,
+ ));
+ });
+ }
+
+ QueryBuilder
+ activityIntervalLessThan(
+ int value, {
+ bool include = false,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.lessThan(
+ include: include,
+ property: r'activityInterval',
+ value: value,
+ ));
+ });
+ }
+
+ QueryBuilder
+ activityIntervalBetween(
+ int lower,
+ int upper, {
+ bool includeLower = true,
+ bool includeUpper = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.between(
+ property: r'activityInterval',
+ lower: lower,
+ includeLower: includeLower,
+ upper: upper,
+ includeUpper: includeUpper,
+ ));
+ });
+ }
+
+ QueryBuilder
+ activityMonitorEqualTo(int value) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'activityMonitor',
+ value: value,
+ ));
+ });
+ }
+
+ QueryBuilder
+ activityMonitorGreaterThan(
+ int value, {
+ bool include = false,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.greaterThan(
+ include: include,
+ property: r'activityMonitor',
+ value: value,
+ ));
+ });
+ }
+
+ QueryBuilder
+ activityMonitorLessThan(
+ int value, {
+ bool include = false,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.lessThan(
+ include: include,
+ property: r'activityMonitor',
+ value: value,
+ ));
+ });
+ }
+
+ QueryBuilder
+ activityMonitorBetween(
+ int lower,
+ int upper, {
+ bool includeLower = true,
+ bool includeUpper = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.between(
+ property: r'activityMonitor',
+ lower: lower,
+ includeLower: includeLower,
+ upper: upper,
+ includeUpper: includeUpper,
+ ));
+ });
+ }
+
+ QueryBuilder
+ alarmDateEqualTo(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'alarmDate',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ alarmDateGreaterThan(
+ String value, {
+ bool include = false,
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.greaterThan(
+ include: include,
+ property: r'alarmDate',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ alarmDateLessThan(
+ String value, {
+ bool include = false,
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.lessThan(
+ include: include,
+ property: r'alarmDate',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ alarmDateBetween(
+ 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'alarmDate',
+ lower: lower,
+ includeLower: includeLower,
+ upper: upper,
+ includeUpper: includeUpper,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ alarmDateStartsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.startsWith(
+ property: r'alarmDate',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ alarmDateEndsWith(
+ String value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.endsWith(
+ property: r'alarmDate',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ alarmDateContains(String value, {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.contains(
+ property: r'alarmDate',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ alarmDateMatches(String pattern, {bool caseSensitive = true}) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.matches(
+ property: r'alarmDate',
+ wildcard: pattern,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ alarmDateIsEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'alarmDate',
+ value: '',
+ ));
+ });
+ }
+
+ QueryBuilder
+ alarmDateIsNotEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.greaterThan(
+ property: r'alarmDate',
+ value: '',
+ ));
+ });
+ }
+
+ QueryBuilder
+ daysElementEqualTo(bool value) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'days',
+ value: value,
+ ));
+ });
+ }
+
+ QueryBuilder
+ daysLengthEqualTo(int length) {
+ return QueryBuilder.apply(this, (query) {
+ return query.listLength(
+ r'days',
+ length,
+ true,
+ length,
+ true,
+ );
+ });
+ }
+
+ QueryBuilder
+ daysIsEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.listLength(
+ r'days',
+ 0,
+ true,
+ 0,
+ true,
+ );
+ });
+ }
+
+ QueryBuilder
+ daysIsNotEmpty() {
+ return QueryBuilder.apply(this, (query) {
+ return query.listLength(
+ r'days',
+ 0,
+ false,
+ 999999,
+ true,
+ );
+ });
+ }
+
+ QueryBuilder
+ daysLengthLessThan(
+ int length, {
+ bool include = false,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.listLength(
+ r'days',
+ 0,
+ true,
+ length,
+ include,
+ );
+ });
+ }
+
+ QueryBuilder
+ daysLengthGreaterThan(
+ int length, {
+ bool include = false,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.listLength(
+ r'days',
+ length,
+ include,
+ 999999,
+ true,
+ );
+ });
+ }
+
+ QueryBuilder
+ daysLengthBetween(
+ int lower,
+ int upper, {
+ bool includeLower = true,
+ bool includeUpper = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.listLength(
+ r'days',
+ lower,
+ includeLower,
+ upper,
+ includeUpper,
+ );
+ });
+ }
+
+ QueryBuilder
+ deleteAfterGoesOffEqualTo(bool value) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'deleteAfterGoesOff',
+ value: value,
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdIsNull() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(const FilterCondition.isNull(
+ property: r'firestoreId',
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdIsNotNull() {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(const FilterCondition.isNotNull(
+ property: r'firestoreId',
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdEqualTo(
+ String? value, {
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.equalTo(
+ property: r'firestoreId',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdGreaterThan(
+ String? value, {
+ bool include = false,
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.greaterThan(
+ include: include,
+ property: r'firestoreId',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdLessThan(
+ String? value, {
+ bool include = false,
+ bool caseSensitive = true,
+ }) {
+ return QueryBuilder.apply(this, (query) {
+ return query.addFilterCondition(FilterCondition.lessThan(
+ include: include,
+ property: r'firestoreId',
+ value: value,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder
+ firestoreIdBetween(
+ 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'firestoreId',
+ lower: lower,
+ includeLower: includeLower,
+ upper: upper,
+ includeUpper: includeUpper,
+ caseSensitive: caseSensitive,
+ ));
+ });
+ }
+
+ QueryBuilder