// GENERATED CODE - DO NOT MODIFY BY HAND part of 'database.dart'; // ignore_for_file: type=lint class $VarietiesTable extends Varieties with TableInfo<$VarietiesTable, Variety> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $VarietiesTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _labelMeta = const VerificationMeta('label'); @override late final GeneratedColumn label = GeneratedColumn( 'label', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _speciesIdMeta = const VerificationMeta( 'speciesId', ); @override late final GeneratedColumn speciesId = GeneratedColumn( 'species_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _cultivarNameMeta = const VerificationMeta( 'cultivarName', ); @override late final GeneratedColumn cultivarName = GeneratedColumn( 'cultivar_name', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _categoryMeta = const VerificationMeta( 'category', ); @override late final GeneratedColumn category = GeneratedColumn( 'category', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _notesMeta = const VerificationMeta('notes'); @override late final GeneratedColumn notes = GeneratedColumn( 'notes', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _isDraftMeta = const VerificationMeta( 'isDraft', ); @override late final GeneratedColumn isDraft = GeneratedColumn( 'is_draft', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_draft" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _isOrganicMeta = const VerificationMeta( 'isOrganic', ); @override late final GeneratedColumn isOrganic = GeneratedColumn( 'is_organic', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_organic" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _needsReproductionMeta = const VerificationMeta( 'needsReproduction', ); @override late final GeneratedColumn needsReproduction = GeneratedColumn( 'needs_reproduction', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("needs_reproduction" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _sowMonthsMeta = const VerificationMeta( 'sowMonths', ); @override late final GeneratedColumn sowMonths = GeneratedColumn( 'sow_months', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _transplantMonthsMeta = const VerificationMeta( 'transplantMonths', ); @override late final GeneratedColumn transplantMonths = GeneratedColumn( 'transplant_months', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _floweringMonthsMeta = const VerificationMeta( 'floweringMonths', ); @override late final GeneratedColumn floweringMonths = GeneratedColumn( 'flowering_months', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _fruitingMonthsMeta = const VerificationMeta( 'fruitingMonths', ); @override late final GeneratedColumn fruitingMonths = GeneratedColumn( 'fruiting_months', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _seedHarvestMonthsMeta = const VerificationMeta( 'seedHarvestMonths', ); @override late final GeneratedColumn seedHarvestMonths = GeneratedColumn( 'seed_harvest_months', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, label, speciesId, cultivarName, category, notes, isDraft, isOrganic, needsReproduction, sowMonths, transplantMonths, floweringMonths, fruitingMonths, seedHarvestMonths, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'varieties'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('label')) { context.handle( _labelMeta, label.isAcceptableOrUnknown(data['label']!, _labelMeta), ); } else if (isInserting) { context.missing(_labelMeta); } if (data.containsKey('species_id')) { context.handle( _speciesIdMeta, speciesId.isAcceptableOrUnknown(data['species_id']!, _speciesIdMeta), ); } if (data.containsKey('cultivar_name')) { context.handle( _cultivarNameMeta, cultivarName.isAcceptableOrUnknown( data['cultivar_name']!, _cultivarNameMeta, ), ); } if (data.containsKey('category')) { context.handle( _categoryMeta, category.isAcceptableOrUnknown(data['category']!, _categoryMeta), ); } if (data.containsKey('notes')) { context.handle( _notesMeta, notes.isAcceptableOrUnknown(data['notes']!, _notesMeta), ); } if (data.containsKey('is_draft')) { context.handle( _isDraftMeta, isDraft.isAcceptableOrUnknown(data['is_draft']!, _isDraftMeta), ); } if (data.containsKey('is_organic')) { context.handle( _isOrganicMeta, isOrganic.isAcceptableOrUnknown(data['is_organic']!, _isOrganicMeta), ); } if (data.containsKey('needs_reproduction')) { context.handle( _needsReproductionMeta, needsReproduction.isAcceptableOrUnknown( data['needs_reproduction']!, _needsReproductionMeta, ), ); } if (data.containsKey('sow_months')) { context.handle( _sowMonthsMeta, sowMonths.isAcceptableOrUnknown(data['sow_months']!, _sowMonthsMeta), ); } if (data.containsKey('transplant_months')) { context.handle( _transplantMonthsMeta, transplantMonths.isAcceptableOrUnknown( data['transplant_months']!, _transplantMonthsMeta, ), ); } if (data.containsKey('flowering_months')) { context.handle( _floweringMonthsMeta, floweringMonths.isAcceptableOrUnknown( data['flowering_months']!, _floweringMonthsMeta, ), ); } if (data.containsKey('fruiting_months')) { context.handle( _fruitingMonthsMeta, fruitingMonths.isAcceptableOrUnknown( data['fruiting_months']!, _fruitingMonthsMeta, ), ); } if (data.containsKey('seed_harvest_months')) { context.handle( _seedHarvestMonthsMeta, seedHarvestMonths.isAcceptableOrUnknown( data['seed_harvest_months']!, _seedHarvestMonthsMeta, ), ); } return context; } @override Set get $primaryKey => {id}; @override Variety map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Variety( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, label: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}label'], )!, speciesId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}species_id'], ), cultivarName: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}cultivar_name'], ), category: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}category'], ), notes: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}notes'], ), isDraft: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_draft'], )!, isOrganic: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_organic'], )!, needsReproduction: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}needs_reproduction'], )!, sowMonths: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}sow_months'], ), transplantMonths: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}transplant_months'], ), floweringMonths: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}flowering_months'], ), fruitingMonths: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}fruiting_months'], ), seedHarvestMonths: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}seed_harvest_months'], ), ); } @override $VarietiesTable createAlias(String alias) { return $VarietiesTable(attachedDatabase, alias); } } class Variety extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final String label; final String? speciesId; final String? cultivarName; final String? category; final String? notes; /// A draft captured photo-first ("capture now, catalogue later"): it holds a /// photo but not yet a real name, and lives in the "to catalogue" tray until /// the user labels it. A plain LWW scalar, so it merges like any other field. final bool isDraft; /// Grower-declared organic ("eco") provenance. A self-declaration, not a /// third-party certification (that would be a separate flag). Surfaced as a /// badge and an inventory filter. A plain LWW scalar. final bool isOrganic; /// A stewardship intent set by the grower: "regrow this variety this season" /// before its stock or vitality runs out. Complements the automatic viability /// warning (which is age-derived) with an explicit human decision. Surfaced /// as a badge and an inventory filter. A plain LWW scalar. final bool needsReproduction; /// Advisory crop-calendar months, typical for this variety — when to sow, /// transplant, expect flowers/fruit, and harvest seed. Each phase usually /// spans several months (e.g. sow in spring *and* autumn), so each is a set /// of months packed as a 12-bit mask (see `domain/crop_calendar.dart`), an /// optional LWW scalar; null means "not recorded". Guidance, not a per-year /// actuals log (that path stays available via Movements). final int? sowMonths; final int? transplantMonths; final int? floweringMonths; final int? fruitingMonths; final int? seedHarvestMonths; const Variety({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.label, this.speciesId, this.cultivarName, this.category, this.notes, required this.isDraft, required this.isOrganic, required this.needsReproduction, this.sowMonths, this.transplantMonths, this.floweringMonths, this.fruitingMonths, this.seedHarvestMonths, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); map['label'] = Variable(label); if (!nullToAbsent || speciesId != null) { map['species_id'] = Variable(speciesId); } if (!nullToAbsent || cultivarName != null) { map['cultivar_name'] = Variable(cultivarName); } if (!nullToAbsent || category != null) { map['category'] = Variable(category); } if (!nullToAbsent || notes != null) { map['notes'] = Variable(notes); } map['is_draft'] = Variable(isDraft); map['is_organic'] = Variable(isOrganic); map['needs_reproduction'] = Variable(needsReproduction); if (!nullToAbsent || sowMonths != null) { map['sow_months'] = Variable(sowMonths); } if (!nullToAbsent || transplantMonths != null) { map['transplant_months'] = Variable(transplantMonths); } if (!nullToAbsent || floweringMonths != null) { map['flowering_months'] = Variable(floweringMonths); } if (!nullToAbsent || fruitingMonths != null) { map['fruiting_months'] = Variable(fruitingMonths); } if (!nullToAbsent || seedHarvestMonths != null) { map['seed_harvest_months'] = Variable(seedHarvestMonths); } return map; } VarietiesCompanion toCompanion(bool nullToAbsent) { return VarietiesCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), label: Value(label), speciesId: speciesId == null && nullToAbsent ? const Value.absent() : Value(speciesId), cultivarName: cultivarName == null && nullToAbsent ? const Value.absent() : Value(cultivarName), category: category == null && nullToAbsent ? const Value.absent() : Value(category), notes: notes == null && nullToAbsent ? const Value.absent() : Value(notes), isDraft: Value(isDraft), isOrganic: Value(isOrganic), needsReproduction: Value(needsReproduction), sowMonths: sowMonths == null && nullToAbsent ? const Value.absent() : Value(sowMonths), transplantMonths: transplantMonths == null && nullToAbsent ? const Value.absent() : Value(transplantMonths), floweringMonths: floweringMonths == null && nullToAbsent ? const Value.absent() : Value(floweringMonths), fruitingMonths: fruitingMonths == null && nullToAbsent ? const Value.absent() : Value(fruitingMonths), seedHarvestMonths: seedHarvestMonths == null && nullToAbsent ? const Value.absent() : Value(seedHarvestMonths), ); } factory Variety.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Variety( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), label: serializer.fromJson(json['label']), speciesId: serializer.fromJson(json['speciesId']), cultivarName: serializer.fromJson(json['cultivarName']), category: serializer.fromJson(json['category']), notes: serializer.fromJson(json['notes']), isDraft: serializer.fromJson(json['isDraft']), isOrganic: serializer.fromJson(json['isOrganic']), needsReproduction: serializer.fromJson(json['needsReproduction']), sowMonths: serializer.fromJson(json['sowMonths']), transplantMonths: serializer.fromJson(json['transplantMonths']), floweringMonths: serializer.fromJson(json['floweringMonths']), fruitingMonths: serializer.fromJson(json['fruitingMonths']), seedHarvestMonths: serializer.fromJson(json['seedHarvestMonths']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'label': serializer.toJson(label), 'speciesId': serializer.toJson(speciesId), 'cultivarName': serializer.toJson(cultivarName), 'category': serializer.toJson(category), 'notes': serializer.toJson(notes), 'isDraft': serializer.toJson(isDraft), 'isOrganic': serializer.toJson(isOrganic), 'needsReproduction': serializer.toJson(needsReproduction), 'sowMonths': serializer.toJson(sowMonths), 'transplantMonths': serializer.toJson(transplantMonths), 'floweringMonths': serializer.toJson(floweringMonths), 'fruitingMonths': serializer.toJson(fruitingMonths), 'seedHarvestMonths': serializer.toJson(seedHarvestMonths), }; } Variety copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, String? label, Value speciesId = const Value.absent(), Value cultivarName = const Value.absent(), Value category = const Value.absent(), Value notes = const Value.absent(), bool? isDraft, bool? isOrganic, bool? needsReproduction, Value sowMonths = const Value.absent(), Value transplantMonths = const Value.absent(), Value floweringMonths = const Value.absent(), Value fruitingMonths = const Value.absent(), Value seedHarvestMonths = const Value.absent(), }) => Variety( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, label: label ?? this.label, speciesId: speciesId.present ? speciesId.value : this.speciesId, cultivarName: cultivarName.present ? cultivarName.value : this.cultivarName, category: category.present ? category.value : this.category, notes: notes.present ? notes.value : this.notes, isDraft: isDraft ?? this.isDraft, isOrganic: isOrganic ?? this.isOrganic, needsReproduction: needsReproduction ?? this.needsReproduction, sowMonths: sowMonths.present ? sowMonths.value : this.sowMonths, transplantMonths: transplantMonths.present ? transplantMonths.value : this.transplantMonths, floweringMonths: floweringMonths.present ? floweringMonths.value : this.floweringMonths, fruitingMonths: fruitingMonths.present ? fruitingMonths.value : this.fruitingMonths, seedHarvestMonths: seedHarvestMonths.present ? seedHarvestMonths.value : this.seedHarvestMonths, ); Variety copyWithCompanion(VarietiesCompanion data) { return Variety( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, label: data.label.present ? data.label.value : this.label, speciesId: data.speciesId.present ? data.speciesId.value : this.speciesId, cultivarName: data.cultivarName.present ? data.cultivarName.value : this.cultivarName, category: data.category.present ? data.category.value : this.category, notes: data.notes.present ? data.notes.value : this.notes, isDraft: data.isDraft.present ? data.isDraft.value : this.isDraft, isOrganic: data.isOrganic.present ? data.isOrganic.value : this.isOrganic, needsReproduction: data.needsReproduction.present ? data.needsReproduction.value : this.needsReproduction, sowMonths: data.sowMonths.present ? data.sowMonths.value : this.sowMonths, transplantMonths: data.transplantMonths.present ? data.transplantMonths.value : this.transplantMonths, floweringMonths: data.floweringMonths.present ? data.floweringMonths.value : this.floweringMonths, fruitingMonths: data.fruitingMonths.present ? data.fruitingMonths.value : this.fruitingMonths, seedHarvestMonths: data.seedHarvestMonths.present ? data.seedHarvestMonths.value : this.seedHarvestMonths, ); } @override String toString() { return (StringBuffer('Variety(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('label: $label, ') ..write('speciesId: $speciesId, ') ..write('cultivarName: $cultivarName, ') ..write('category: $category, ') ..write('notes: $notes, ') ..write('isDraft: $isDraft, ') ..write('isOrganic: $isOrganic, ') ..write('needsReproduction: $needsReproduction, ') ..write('sowMonths: $sowMonths, ') ..write('transplantMonths: $transplantMonths, ') ..write('floweringMonths: $floweringMonths, ') ..write('fruitingMonths: $fruitingMonths, ') ..write('seedHarvestMonths: $seedHarvestMonths') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, label, speciesId, cultivarName, category, notes, isDraft, isOrganic, needsReproduction, sowMonths, transplantMonths, floweringMonths, fruitingMonths, seedHarvestMonths, ); @override bool operator ==(Object other) => identical(this, other) || (other is Variety && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.label == this.label && other.speciesId == this.speciesId && other.cultivarName == this.cultivarName && other.category == this.category && other.notes == this.notes && other.isDraft == this.isDraft && other.isOrganic == this.isOrganic && other.needsReproduction == this.needsReproduction && other.sowMonths == this.sowMonths && other.transplantMonths == this.transplantMonths && other.floweringMonths == this.floweringMonths && other.fruitingMonths == this.fruitingMonths && other.seedHarvestMonths == this.seedHarvestMonths); } class VarietiesCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value label; final Value speciesId; final Value cultivarName; final Value category; final Value notes; final Value isDraft; final Value isOrganic; final Value needsReproduction; final Value sowMonths; final Value transplantMonths; final Value floweringMonths; final Value fruitingMonths; final Value seedHarvestMonths; final Value rowid; const VarietiesCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.label = const Value.absent(), this.speciesId = const Value.absent(), this.cultivarName = const Value.absent(), this.category = const Value.absent(), this.notes = const Value.absent(), this.isDraft = const Value.absent(), this.isOrganic = const Value.absent(), this.needsReproduction = const Value.absent(), this.sowMonths = const Value.absent(), this.transplantMonths = const Value.absent(), this.floweringMonths = const Value.absent(), this.fruitingMonths = const Value.absent(), this.seedHarvestMonths = const Value.absent(), this.rowid = const Value.absent(), }); VarietiesCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required String label, this.speciesId = const Value.absent(), this.cultivarName = const Value.absent(), this.category = const Value.absent(), this.notes = const Value.absent(), this.isDraft = const Value.absent(), this.isOrganic = const Value.absent(), this.needsReproduction = const Value.absent(), this.sowMonths = const Value.absent(), this.transplantMonths = const Value.absent(), this.floweringMonths = const Value.absent(), this.fruitingMonths = const Value.absent(), this.seedHarvestMonths = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), label = Value(label); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? label, Expression? speciesId, Expression? cultivarName, Expression? category, Expression? notes, Expression? isDraft, Expression? isOrganic, Expression? needsReproduction, Expression? sowMonths, Expression? transplantMonths, Expression? floweringMonths, Expression? fruitingMonths, Expression? seedHarvestMonths, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (label != null) 'label': label, if (speciesId != null) 'species_id': speciesId, if (cultivarName != null) 'cultivar_name': cultivarName, if (category != null) 'category': category, if (notes != null) 'notes': notes, if (isDraft != null) 'is_draft': isDraft, if (isOrganic != null) 'is_organic': isOrganic, if (needsReproduction != null) 'needs_reproduction': needsReproduction, if (sowMonths != null) 'sow_months': sowMonths, if (transplantMonths != null) 'transplant_months': transplantMonths, if (floweringMonths != null) 'flowering_months': floweringMonths, if (fruitingMonths != null) 'fruiting_months': fruitingMonths, if (seedHarvestMonths != null) 'seed_harvest_months': seedHarvestMonths, if (rowid != null) 'rowid': rowid, }); } VarietiesCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? label, Value? speciesId, Value? cultivarName, Value? category, Value? notes, Value? isDraft, Value? isOrganic, Value? needsReproduction, Value? sowMonths, Value? transplantMonths, Value? floweringMonths, Value? fruitingMonths, Value? seedHarvestMonths, Value? rowid, }) { return VarietiesCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, label: label ?? this.label, speciesId: speciesId ?? this.speciesId, cultivarName: cultivarName ?? this.cultivarName, category: category ?? this.category, notes: notes ?? this.notes, isDraft: isDraft ?? this.isDraft, isOrganic: isOrganic ?? this.isOrganic, needsReproduction: needsReproduction ?? this.needsReproduction, sowMonths: sowMonths ?? this.sowMonths, transplantMonths: transplantMonths ?? this.transplantMonths, floweringMonths: floweringMonths ?? this.floweringMonths, fruitingMonths: fruitingMonths ?? this.fruitingMonths, seedHarvestMonths: seedHarvestMonths ?? this.seedHarvestMonths, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (label.present) { map['label'] = Variable(label.value); } if (speciesId.present) { map['species_id'] = Variable(speciesId.value); } if (cultivarName.present) { map['cultivar_name'] = Variable(cultivarName.value); } if (category.present) { map['category'] = Variable(category.value); } if (notes.present) { map['notes'] = Variable(notes.value); } if (isDraft.present) { map['is_draft'] = Variable(isDraft.value); } if (isOrganic.present) { map['is_organic'] = Variable(isOrganic.value); } if (needsReproduction.present) { map['needs_reproduction'] = Variable(needsReproduction.value); } if (sowMonths.present) { map['sow_months'] = Variable(sowMonths.value); } if (transplantMonths.present) { map['transplant_months'] = Variable(transplantMonths.value); } if (floweringMonths.present) { map['flowering_months'] = Variable(floweringMonths.value); } if (fruitingMonths.present) { map['fruiting_months'] = Variable(fruitingMonths.value); } if (seedHarvestMonths.present) { map['seed_harvest_months'] = Variable(seedHarvestMonths.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('VarietiesCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('label: $label, ') ..write('speciesId: $speciesId, ') ..write('cultivarName: $cultivarName, ') ..write('category: $category, ') ..write('notes: $notes, ') ..write('isDraft: $isDraft, ') ..write('isOrganic: $isOrganic, ') ..write('needsReproduction: $needsReproduction, ') ..write('sowMonths: $sowMonths, ') ..write('transplantMonths: $transplantMonths, ') ..write('floweringMonths: $floweringMonths, ') ..write('fruitingMonths: $fruitingMonths, ') ..write('seedHarvestMonths: $seedHarvestMonths, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $VarietyVernacularNamesTable extends VarietyVernacularNames with TableInfo<$VarietyVernacularNamesTable, VarietyVernacularName> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $VarietyVernacularNamesTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _varietyIdMeta = const VerificationMeta( 'varietyId', ); @override late final GeneratedColumn varietyId = GeneratedColumn( 'variety_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _nameMeta = const VerificationMeta('name'); @override late final GeneratedColumn name = GeneratedColumn( 'name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _languageMeta = const VerificationMeta( 'language', ); @override late final GeneratedColumn language = GeneratedColumn( 'language', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _regionMeta = const VerificationMeta('region'); @override late final GeneratedColumn region = GeneratedColumn( 'region', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, varietyId, name, language, region, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'variety_vernacular_names'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('variety_id')) { context.handle( _varietyIdMeta, varietyId.isAcceptableOrUnknown(data['variety_id']!, _varietyIdMeta), ); } else if (isInserting) { context.missing(_varietyIdMeta); } if (data.containsKey('name')) { context.handle( _nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta), ); } else if (isInserting) { context.missing(_nameMeta); } if (data.containsKey('language')) { context.handle( _languageMeta, language.isAcceptableOrUnknown(data['language']!, _languageMeta), ); } if (data.containsKey('region')) { context.handle( _regionMeta, region.isAcceptableOrUnknown(data['region']!, _regionMeta), ); } return context; } @override Set get $primaryKey => {id}; @override VarietyVernacularName map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return VarietyVernacularName( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, varietyId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}variety_id'], )!, name: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}name'], )!, language: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}language'], ), region: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}region'], ), ); } @override $VarietyVernacularNamesTable createAlias(String alias) { return $VarietyVernacularNamesTable(attachedDatabase, alias); } } class VarietyVernacularName extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final String varietyId; final String name; final String? language; final String? region; const VarietyVernacularName({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.varietyId, required this.name, this.language, this.region, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); map['variety_id'] = Variable(varietyId); map['name'] = Variable(name); if (!nullToAbsent || language != null) { map['language'] = Variable(language); } if (!nullToAbsent || region != null) { map['region'] = Variable(region); } return map; } VarietyVernacularNamesCompanion toCompanion(bool nullToAbsent) { return VarietyVernacularNamesCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), varietyId: Value(varietyId), name: Value(name), language: language == null && nullToAbsent ? const Value.absent() : Value(language), region: region == null && nullToAbsent ? const Value.absent() : Value(region), ); } factory VarietyVernacularName.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return VarietyVernacularName( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), varietyId: serializer.fromJson(json['varietyId']), name: serializer.fromJson(json['name']), language: serializer.fromJson(json['language']), region: serializer.fromJson(json['region']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'varietyId': serializer.toJson(varietyId), 'name': serializer.toJson(name), 'language': serializer.toJson(language), 'region': serializer.toJson(region), }; } VarietyVernacularName copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, String? varietyId, String? name, Value language = const Value.absent(), Value region = const Value.absent(), }) => VarietyVernacularName( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, varietyId: varietyId ?? this.varietyId, name: name ?? this.name, language: language.present ? language.value : this.language, region: region.present ? region.value : this.region, ); VarietyVernacularName copyWithCompanion( VarietyVernacularNamesCompanion data, ) { return VarietyVernacularName( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, varietyId: data.varietyId.present ? data.varietyId.value : this.varietyId, name: data.name.present ? data.name.value : this.name, language: data.language.present ? data.language.value : this.language, region: data.region.present ? data.region.value : this.region, ); } @override String toString() { return (StringBuffer('VarietyVernacularName(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('varietyId: $varietyId, ') ..write('name: $name, ') ..write('language: $language, ') ..write('region: $region') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, varietyId, name, language, region, ); @override bool operator ==(Object other) => identical(this, other) || (other is VarietyVernacularName && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.varietyId == this.varietyId && other.name == this.name && other.language == this.language && other.region == this.region); } class VarietyVernacularNamesCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value varietyId; final Value name; final Value language; final Value region; final Value rowid; const VarietyVernacularNamesCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.varietyId = const Value.absent(), this.name = const Value.absent(), this.language = const Value.absent(), this.region = const Value.absent(), this.rowid = const Value.absent(), }); VarietyVernacularNamesCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required String varietyId, required String name, this.language = const Value.absent(), this.region = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), varietyId = Value(varietyId), name = Value(name); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? varietyId, Expression? name, Expression? language, Expression? region, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (varietyId != null) 'variety_id': varietyId, if (name != null) 'name': name, if (language != null) 'language': language, if (region != null) 'region': region, if (rowid != null) 'rowid': rowid, }); } VarietyVernacularNamesCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? varietyId, Value? name, Value? language, Value? region, Value? rowid, }) { return VarietyVernacularNamesCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, varietyId: varietyId ?? this.varietyId, name: name ?? this.name, language: language ?? this.language, region: region ?? this.region, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (varietyId.present) { map['variety_id'] = Variable(varietyId.value); } if (name.present) { map['name'] = Variable(name.value); } if (language.present) { map['language'] = Variable(language.value); } if (region.present) { map['region'] = Variable(region.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('VarietyVernacularNamesCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('varietyId: $varietyId, ') ..write('name: $name, ') ..write('language: $language, ') ..write('region: $region, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $SpeciesTable extends Species with TableInfo<$SpeciesTable, Specy> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $SpeciesTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _scientificNameMeta = const VerificationMeta( 'scientificName', ); @override late final GeneratedColumn scientificName = GeneratedColumn( 'scientific_name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _wikidataQidMeta = const VerificationMeta( 'wikidataQid', ); @override late final GeneratedColumn wikidataQid = GeneratedColumn( 'wikidata_qid', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _gbifKeyMeta = const VerificationMeta( 'gbifKey', ); @override late final GeneratedColumn gbifKey = GeneratedColumn( 'gbif_key', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _familyMeta = const VerificationMeta('family'); @override late final GeneratedColumn family = GeneratedColumn( 'family', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _isBundledMeta = const VerificationMeta( 'isBundled', ); @override late final GeneratedColumn isBundled = GeneratedColumn( 'is_bundled', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_bundled" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _viabilityYearsMeta = const VerificationMeta( 'viabilityYears', ); @override late final GeneratedColumn viabilityYears = GeneratedColumn( 'viability_years', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, scientificName, wikidataQid, gbifKey, family, isBundled, viabilityYears, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'species'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('scientific_name')) { context.handle( _scientificNameMeta, scientificName.isAcceptableOrUnknown( data['scientific_name']!, _scientificNameMeta, ), ); } else if (isInserting) { context.missing(_scientificNameMeta); } if (data.containsKey('wikidata_qid')) { context.handle( _wikidataQidMeta, wikidataQid.isAcceptableOrUnknown( data['wikidata_qid']!, _wikidataQidMeta, ), ); } if (data.containsKey('gbif_key')) { context.handle( _gbifKeyMeta, gbifKey.isAcceptableOrUnknown(data['gbif_key']!, _gbifKeyMeta), ); } if (data.containsKey('family')) { context.handle( _familyMeta, family.isAcceptableOrUnknown(data['family']!, _familyMeta), ); } if (data.containsKey('is_bundled')) { context.handle( _isBundledMeta, isBundled.isAcceptableOrUnknown(data['is_bundled']!, _isBundledMeta), ); } if (data.containsKey('viability_years')) { context.handle( _viabilityYearsMeta, viabilityYears.isAcceptableOrUnknown( data['viability_years']!, _viabilityYearsMeta, ), ); } return context; } @override Set get $primaryKey => {id}; @override Specy map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Specy( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, scientificName: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}scientific_name'], )!, wikidataQid: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}wikidata_qid'], ), gbifKey: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}gbif_key'], ), family: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}family'], ), isBundled: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_bundled'], )!, viabilityYears: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}viability_years'], ), ); } @override $SpeciesTable createAlias(String alias) { return $SpeciesTable(attachedDatabase, alias); } } class Specy extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final String scientificName; final String? wikidataQid; final int? gbifKey; final String? family; final bool isBundled; /// Typical seed longevity in years under normal home storage — public-domain /// reference data bundled with the catalog (agricultural-extension viability /// tables). Drives the "expiring / past viability" warning on aging lots by /// comparing against a lot's [Lots.harvestYear]. Nullable: unknown for /// species without a bundled figure. final int? viabilityYears; const Specy({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.scientificName, this.wikidataQid, this.gbifKey, this.family, required this.isBundled, this.viabilityYears, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); map['scientific_name'] = Variable(scientificName); if (!nullToAbsent || wikidataQid != null) { map['wikidata_qid'] = Variable(wikidataQid); } if (!nullToAbsent || gbifKey != null) { map['gbif_key'] = Variable(gbifKey); } if (!nullToAbsent || family != null) { map['family'] = Variable(family); } map['is_bundled'] = Variable(isBundled); if (!nullToAbsent || viabilityYears != null) { map['viability_years'] = Variable(viabilityYears); } return map; } SpeciesCompanion toCompanion(bool nullToAbsent) { return SpeciesCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), scientificName: Value(scientificName), wikidataQid: wikidataQid == null && nullToAbsent ? const Value.absent() : Value(wikidataQid), gbifKey: gbifKey == null && nullToAbsent ? const Value.absent() : Value(gbifKey), family: family == null && nullToAbsent ? const Value.absent() : Value(family), isBundled: Value(isBundled), viabilityYears: viabilityYears == null && nullToAbsent ? const Value.absent() : Value(viabilityYears), ); } factory Specy.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Specy( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), scientificName: serializer.fromJson(json['scientificName']), wikidataQid: serializer.fromJson(json['wikidataQid']), gbifKey: serializer.fromJson(json['gbifKey']), family: serializer.fromJson(json['family']), isBundled: serializer.fromJson(json['isBundled']), viabilityYears: serializer.fromJson(json['viabilityYears']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'scientificName': serializer.toJson(scientificName), 'wikidataQid': serializer.toJson(wikidataQid), 'gbifKey': serializer.toJson(gbifKey), 'family': serializer.toJson(family), 'isBundled': serializer.toJson(isBundled), 'viabilityYears': serializer.toJson(viabilityYears), }; } Specy copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, String? scientificName, Value wikidataQid = const Value.absent(), Value gbifKey = const Value.absent(), Value family = const Value.absent(), bool? isBundled, Value viabilityYears = const Value.absent(), }) => Specy( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, scientificName: scientificName ?? this.scientificName, wikidataQid: wikidataQid.present ? wikidataQid.value : this.wikidataQid, gbifKey: gbifKey.present ? gbifKey.value : this.gbifKey, family: family.present ? family.value : this.family, isBundled: isBundled ?? this.isBundled, viabilityYears: viabilityYears.present ? viabilityYears.value : this.viabilityYears, ); Specy copyWithCompanion(SpeciesCompanion data) { return Specy( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, scientificName: data.scientificName.present ? data.scientificName.value : this.scientificName, wikidataQid: data.wikidataQid.present ? data.wikidataQid.value : this.wikidataQid, gbifKey: data.gbifKey.present ? data.gbifKey.value : this.gbifKey, family: data.family.present ? data.family.value : this.family, isBundled: data.isBundled.present ? data.isBundled.value : this.isBundled, viabilityYears: data.viabilityYears.present ? data.viabilityYears.value : this.viabilityYears, ); } @override String toString() { return (StringBuffer('Specy(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('scientificName: $scientificName, ') ..write('wikidataQid: $wikidataQid, ') ..write('gbifKey: $gbifKey, ') ..write('family: $family, ') ..write('isBundled: $isBundled, ') ..write('viabilityYears: $viabilityYears') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, scientificName, wikidataQid, gbifKey, family, isBundled, viabilityYears, ); @override bool operator ==(Object other) => identical(this, other) || (other is Specy && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.scientificName == this.scientificName && other.wikidataQid == this.wikidataQid && other.gbifKey == this.gbifKey && other.family == this.family && other.isBundled == this.isBundled && other.viabilityYears == this.viabilityYears); } class SpeciesCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value scientificName; final Value wikidataQid; final Value gbifKey; final Value family; final Value isBundled; final Value viabilityYears; final Value rowid; const SpeciesCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.scientificName = const Value.absent(), this.wikidataQid = const Value.absent(), this.gbifKey = const Value.absent(), this.family = const Value.absent(), this.isBundled = const Value.absent(), this.viabilityYears = const Value.absent(), this.rowid = const Value.absent(), }); SpeciesCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required String scientificName, this.wikidataQid = const Value.absent(), this.gbifKey = const Value.absent(), this.family = const Value.absent(), this.isBundled = const Value.absent(), this.viabilityYears = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), scientificName = Value(scientificName); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? scientificName, Expression? wikidataQid, Expression? gbifKey, Expression? family, Expression? isBundled, Expression? viabilityYears, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (scientificName != null) 'scientific_name': scientificName, if (wikidataQid != null) 'wikidata_qid': wikidataQid, if (gbifKey != null) 'gbif_key': gbifKey, if (family != null) 'family': family, if (isBundled != null) 'is_bundled': isBundled, if (viabilityYears != null) 'viability_years': viabilityYears, if (rowid != null) 'rowid': rowid, }); } SpeciesCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? scientificName, Value? wikidataQid, Value? gbifKey, Value? family, Value? isBundled, Value? viabilityYears, Value? rowid, }) { return SpeciesCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, scientificName: scientificName ?? this.scientificName, wikidataQid: wikidataQid ?? this.wikidataQid, gbifKey: gbifKey ?? this.gbifKey, family: family ?? this.family, isBundled: isBundled ?? this.isBundled, viabilityYears: viabilityYears ?? this.viabilityYears, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (scientificName.present) { map['scientific_name'] = Variable(scientificName.value); } if (wikidataQid.present) { map['wikidata_qid'] = Variable(wikidataQid.value); } if (gbifKey.present) { map['gbif_key'] = Variable(gbifKey.value); } if (family.present) { map['family'] = Variable(family.value); } if (isBundled.present) { map['is_bundled'] = Variable(isBundled.value); } if (viabilityYears.present) { map['viability_years'] = Variable(viabilityYears.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('SpeciesCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('scientificName: $scientificName, ') ..write('wikidataQid: $wikidataQid, ') ..write('gbifKey: $gbifKey, ') ..write('family: $family, ') ..write('isBundled: $isBundled, ') ..write('viabilityYears: $viabilityYears, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $SpeciesCommonNamesTable extends SpeciesCommonNames with TableInfo<$SpeciesCommonNamesTable, SpeciesCommonName> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $SpeciesCommonNamesTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _speciesIdMeta = const VerificationMeta( 'speciesId', ); @override late final GeneratedColumn speciesId = GeneratedColumn( 'species_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _nameMeta = const VerificationMeta('name'); @override late final GeneratedColumn name = GeneratedColumn( 'name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _languageMeta = const VerificationMeta( 'language', ); @override late final GeneratedColumn language = GeneratedColumn( 'language', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, speciesId, name, language, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'species_common_names'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('species_id')) { context.handle( _speciesIdMeta, speciesId.isAcceptableOrUnknown(data['species_id']!, _speciesIdMeta), ); } else if (isInserting) { context.missing(_speciesIdMeta); } if (data.containsKey('name')) { context.handle( _nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta), ); } else if (isInserting) { context.missing(_nameMeta); } if (data.containsKey('language')) { context.handle( _languageMeta, language.isAcceptableOrUnknown(data['language']!, _languageMeta), ); } return context; } @override Set get $primaryKey => {id}; @override SpeciesCommonName map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return SpeciesCommonName( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, speciesId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}species_id'], )!, name: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}name'], )!, language: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}language'], ), ); } @override $SpeciesCommonNamesTable createAlias(String alias) { return $SpeciesCommonNamesTable(attachedDatabase, alias); } } class SpeciesCommonName extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final String speciesId; final String name; final String? language; const SpeciesCommonName({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.speciesId, required this.name, this.language, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); map['species_id'] = Variable(speciesId); map['name'] = Variable(name); if (!nullToAbsent || language != null) { map['language'] = Variable(language); } return map; } SpeciesCommonNamesCompanion toCompanion(bool nullToAbsent) { return SpeciesCommonNamesCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), speciesId: Value(speciesId), name: Value(name), language: language == null && nullToAbsent ? const Value.absent() : Value(language), ); } factory SpeciesCommonName.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return SpeciesCommonName( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), speciesId: serializer.fromJson(json['speciesId']), name: serializer.fromJson(json['name']), language: serializer.fromJson(json['language']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'speciesId': serializer.toJson(speciesId), 'name': serializer.toJson(name), 'language': serializer.toJson(language), }; } SpeciesCommonName copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, String? speciesId, String? name, Value language = const Value.absent(), }) => SpeciesCommonName( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, speciesId: speciesId ?? this.speciesId, name: name ?? this.name, language: language.present ? language.value : this.language, ); SpeciesCommonName copyWithCompanion(SpeciesCommonNamesCompanion data) { return SpeciesCommonName( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, speciesId: data.speciesId.present ? data.speciesId.value : this.speciesId, name: data.name.present ? data.name.value : this.name, language: data.language.present ? data.language.value : this.language, ); } @override String toString() { return (StringBuffer('SpeciesCommonName(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('speciesId: $speciesId, ') ..write('name: $name, ') ..write('language: $language') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, speciesId, name, language, ); @override bool operator ==(Object other) => identical(this, other) || (other is SpeciesCommonName && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.speciesId == this.speciesId && other.name == this.name && other.language == this.language); } class SpeciesCommonNamesCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value speciesId; final Value name; final Value language; final Value rowid; const SpeciesCommonNamesCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.speciesId = const Value.absent(), this.name = const Value.absent(), this.language = const Value.absent(), this.rowid = const Value.absent(), }); SpeciesCommonNamesCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required String speciesId, required String name, this.language = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), speciesId = Value(speciesId), name = Value(name); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? speciesId, Expression? name, Expression? language, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (speciesId != null) 'species_id': speciesId, if (name != null) 'name': name, if (language != null) 'language': language, if (rowid != null) 'rowid': rowid, }); } SpeciesCommonNamesCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? speciesId, Value? name, Value? language, Value? rowid, }) { return SpeciesCommonNamesCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, speciesId: speciesId ?? this.speciesId, name: name ?? this.name, language: language ?? this.language, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (speciesId.present) { map['species_id'] = Variable(speciesId.value); } if (name.present) { map['name'] = Variable(name.value); } if (language.present) { map['language'] = Variable(language.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('SpeciesCommonNamesCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('speciesId: $speciesId, ') ..write('name: $name, ') ..write('language: $language, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $LotsTable extends Lots with TableInfo<$LotsTable, Lot> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $LotsTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _varietyIdMeta = const VerificationMeta( 'varietyId', ); @override late final GeneratedColumn varietyId = GeneratedColumn( 'variety_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); @override late final GeneratedColumnWithTypeConverter type = GeneratedColumn( 'type', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: false, defaultValue: const Constant('seed'), ).withConverter($LotsTable.$convertertype); static const VerificationMeta _harvestYearMeta = const VerificationMeta( 'harvestYear', ); @override late final GeneratedColumn harvestYear = GeneratedColumn( 'harvest_year', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _harvestMonthMeta = const VerificationMeta( 'harvestMonth', ); @override late final GeneratedColumn harvestMonth = GeneratedColumn( 'harvest_month', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _quantityKindMeta = const VerificationMeta( 'quantityKind', ); @override late final GeneratedColumn quantityKind = GeneratedColumn( 'quantity_kind', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _quantityPreciseMeta = const VerificationMeta( 'quantityPrecise', ); @override late final GeneratedColumn quantityPrecise = GeneratedColumn( 'quantity_precise', aliasedName, true, type: DriftSqlType.double, requiredDuringInsert: false, ); static const VerificationMeta _quantityLabelMeta = const VerificationMeta( 'quantityLabel', ); @override late final GeneratedColumn quantityLabel = GeneratedColumn( 'quantity_label', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override late final GeneratedColumnWithTypeConverter presentation = GeneratedColumn( 'presentation', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ).withConverter($LotsTable.$converterpresentationn); static const VerificationMeta _storageLocationMeta = const VerificationMeta( 'storageLocation', ); @override late final GeneratedColumn storageLocation = GeneratedColumn( 'storage_location', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override late final GeneratedColumnWithTypeConverter offerStatus = GeneratedColumn( 'offer_status', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: false, defaultValue: const Constant('private'), ).withConverter($LotsTable.$converterofferStatus); static const VerificationMeta _seedbankIdMeta = const VerificationMeta( 'seedbankId', ); @override late final GeneratedColumn seedbankId = GeneratedColumn( 'seedbank_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _originNameMeta = const VerificationMeta( 'originName', ); @override late final GeneratedColumn originName = GeneratedColumn( 'origin_name', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _originPlaceMeta = const VerificationMeta( 'originPlace', ); @override late final GeneratedColumn originPlace = GeneratedColumn( 'origin_place', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override late final GeneratedColumnWithTypeConverter abundance = GeneratedColumn( 'abundance', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ).withConverter($LotsTable.$converterabundancen); @override late final GeneratedColumnWithTypeConverter preservationFormat = GeneratedColumn( 'preservation_format', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ).withConverter( $LotsTable.$converterpreservationFormatn, ); static const VerificationMeta _priceAmountMeta = const VerificationMeta( 'priceAmount', ); @override late final GeneratedColumn priceAmount = GeneratedColumn( 'price_amount', aliasedName, true, type: DriftSqlType.double, requiredDuringInsert: false, ); static const VerificationMeta _priceCurrencyMeta = const VerificationMeta( 'priceCurrency', ); @override late final GeneratedColumn priceCurrency = GeneratedColumn( 'price_currency', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, varietyId, type, harvestYear, harvestMonth, quantityKind, quantityPrecise, quantityLabel, presentation, storageLocation, offerStatus, seedbankId, originName, originPlace, abundance, preservationFormat, priceAmount, priceCurrency, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'lots'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('variety_id')) { context.handle( _varietyIdMeta, varietyId.isAcceptableOrUnknown(data['variety_id']!, _varietyIdMeta), ); } else if (isInserting) { context.missing(_varietyIdMeta); } if (data.containsKey('harvest_year')) { context.handle( _harvestYearMeta, harvestYear.isAcceptableOrUnknown( data['harvest_year']!, _harvestYearMeta, ), ); } if (data.containsKey('harvest_month')) { context.handle( _harvestMonthMeta, harvestMonth.isAcceptableOrUnknown( data['harvest_month']!, _harvestMonthMeta, ), ); } if (data.containsKey('quantity_kind')) { context.handle( _quantityKindMeta, quantityKind.isAcceptableOrUnknown( data['quantity_kind']!, _quantityKindMeta, ), ); } if (data.containsKey('quantity_precise')) { context.handle( _quantityPreciseMeta, quantityPrecise.isAcceptableOrUnknown( data['quantity_precise']!, _quantityPreciseMeta, ), ); } if (data.containsKey('quantity_label')) { context.handle( _quantityLabelMeta, quantityLabel.isAcceptableOrUnknown( data['quantity_label']!, _quantityLabelMeta, ), ); } if (data.containsKey('storage_location')) { context.handle( _storageLocationMeta, storageLocation.isAcceptableOrUnknown( data['storage_location']!, _storageLocationMeta, ), ); } if (data.containsKey('seedbank_id')) { context.handle( _seedbankIdMeta, seedbankId.isAcceptableOrUnknown(data['seedbank_id']!, _seedbankIdMeta), ); } if (data.containsKey('origin_name')) { context.handle( _originNameMeta, originName.isAcceptableOrUnknown(data['origin_name']!, _originNameMeta), ); } if (data.containsKey('origin_place')) { context.handle( _originPlaceMeta, originPlace.isAcceptableOrUnknown( data['origin_place']!, _originPlaceMeta, ), ); } if (data.containsKey('price_amount')) { context.handle( _priceAmountMeta, priceAmount.isAcceptableOrUnknown( data['price_amount']!, _priceAmountMeta, ), ); } if (data.containsKey('price_currency')) { context.handle( _priceCurrencyMeta, priceCurrency.isAcceptableOrUnknown( data['price_currency']!, _priceCurrencyMeta, ), ); } return context; } @override Set get $primaryKey => {id}; @override Lot map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Lot( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, varietyId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}variety_id'], )!, type: $LotsTable.$convertertype.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}type'], )!, ), harvestYear: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}harvest_year'], ), harvestMonth: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}harvest_month'], ), quantityKind: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}quantity_kind'], ), quantityPrecise: attachedDatabase.typeMapping.read( DriftSqlType.double, data['${effectivePrefix}quantity_precise'], ), quantityLabel: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}quantity_label'], ), presentation: $LotsTable.$converterpresentationn.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}presentation'], ), ), storageLocation: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}storage_location'], ), offerStatus: $LotsTable.$converterofferStatus.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}offer_status'], )!, ), seedbankId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}seedbank_id'], ), originName: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}origin_name'], ), originPlace: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}origin_place'], ), abundance: $LotsTable.$converterabundancen.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}abundance'], ), ), preservationFormat: $LotsTable.$converterpreservationFormatn.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}preservation_format'], ), ), priceAmount: attachedDatabase.typeMapping.read( DriftSqlType.double, data['${effectivePrefix}price_amount'], ), priceCurrency: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}price_currency'], ), ); } @override $LotsTable createAlias(String alias) { return $LotsTable(attachedDatabase, alias); } static JsonTypeConverter2 $convertertype = const EnumNameConverter(LotType.values); static JsonTypeConverter2 $converterpresentation = const EnumNameConverter( Presentation.values, ); static JsonTypeConverter2 $converterpresentationn = JsonTypeConverter2.asNullable( $converterpresentation, ); static JsonTypeConverter2 $converterofferStatus = const EnumNameConverter(OfferStatus.values); static JsonTypeConverter2 $converterabundance = const EnumNameConverter(Abundance.values); static JsonTypeConverter2 $converterabundancen = JsonTypeConverter2.asNullable($converterabundance); static JsonTypeConverter2 $converterpreservationFormat = const EnumNameConverter( PreservationFormat.values, ); static JsonTypeConverter2 $converterpreservationFormatn = JsonTypeConverter2.asNullable( $converterpreservationFormat, ); } class Lot extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final String varietyId; final LotType type; final int? harvestYear; final int? harvestMonth; final String? quantityKind; final double? quantityPrecise; final String? quantityLabel; final Presentation? presentation; final String? storageLocation; final OfferStatus offerStatus; final String? seedbankId; /// Provenance of this batch, kept as lightweight free text so it needs no /// Party/Movement to record (the rigorous exchange path stays via Movements). /// [originName] = who grew or gave the seeds; [originPlace] = where they come /// from (with region/province). Both optional LWW scalars. final String? originName; final String? originPlace; /// Optional coarse "how much I have" for this lot — see [Abundance]. An /// offline alternative to the precise Quantity columns; either, both, or /// neither may be set. final Abundance? abundance; /// How the (seed) lot is physically conserved — see [PreservationFormat]. /// Distinct from [storageLocation]. Optional. final PreservationFormat? preservationFormat; /// Asking price when [offerStatus] is `sell` (data-model §2.8 puts price on /// the Offer; with offer state collapsed onto the Lot, it lives here and is /// published with the market offer). Informational only — money changes /// hands off-platform, never in-app. Null amount on a sell lot means /// "price to be agreed" (the offer publishes without a price). final double? priceAmount; /// Free-text currency, like [Sales.currency]: "€", "Ğ1", a local/time /// currency. Never assumed (sharing-model §6). final String? priceCurrency; const Lot({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.varietyId, required this.type, this.harvestYear, this.harvestMonth, this.quantityKind, this.quantityPrecise, this.quantityLabel, this.presentation, this.storageLocation, required this.offerStatus, this.seedbankId, this.originName, this.originPlace, this.abundance, this.preservationFormat, this.priceAmount, this.priceCurrency, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); map['variety_id'] = Variable(varietyId); { map['type'] = Variable($LotsTable.$convertertype.toSql(type)); } if (!nullToAbsent || harvestYear != null) { map['harvest_year'] = Variable(harvestYear); } if (!nullToAbsent || harvestMonth != null) { map['harvest_month'] = Variable(harvestMonth); } if (!nullToAbsent || quantityKind != null) { map['quantity_kind'] = Variable(quantityKind); } if (!nullToAbsent || quantityPrecise != null) { map['quantity_precise'] = Variable(quantityPrecise); } if (!nullToAbsent || quantityLabel != null) { map['quantity_label'] = Variable(quantityLabel); } if (!nullToAbsent || presentation != null) { map['presentation'] = Variable( $LotsTable.$converterpresentationn.toSql(presentation), ); } if (!nullToAbsent || storageLocation != null) { map['storage_location'] = Variable(storageLocation); } { map['offer_status'] = Variable( $LotsTable.$converterofferStatus.toSql(offerStatus), ); } if (!nullToAbsent || seedbankId != null) { map['seedbank_id'] = Variable(seedbankId); } if (!nullToAbsent || originName != null) { map['origin_name'] = Variable(originName); } if (!nullToAbsent || originPlace != null) { map['origin_place'] = Variable(originPlace); } if (!nullToAbsent || abundance != null) { map['abundance'] = Variable( $LotsTable.$converterabundancen.toSql(abundance), ); } if (!nullToAbsent || preservationFormat != null) { map['preservation_format'] = Variable( $LotsTable.$converterpreservationFormatn.toSql(preservationFormat), ); } if (!nullToAbsent || priceAmount != null) { map['price_amount'] = Variable(priceAmount); } if (!nullToAbsent || priceCurrency != null) { map['price_currency'] = Variable(priceCurrency); } return map; } LotsCompanion toCompanion(bool nullToAbsent) { return LotsCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), varietyId: Value(varietyId), type: Value(type), harvestYear: harvestYear == null && nullToAbsent ? const Value.absent() : Value(harvestYear), harvestMonth: harvestMonth == null && nullToAbsent ? const Value.absent() : Value(harvestMonth), quantityKind: quantityKind == null && nullToAbsent ? const Value.absent() : Value(quantityKind), quantityPrecise: quantityPrecise == null && nullToAbsent ? const Value.absent() : Value(quantityPrecise), quantityLabel: quantityLabel == null && nullToAbsent ? const Value.absent() : Value(quantityLabel), presentation: presentation == null && nullToAbsent ? const Value.absent() : Value(presentation), storageLocation: storageLocation == null && nullToAbsent ? const Value.absent() : Value(storageLocation), offerStatus: Value(offerStatus), seedbankId: seedbankId == null && nullToAbsent ? const Value.absent() : Value(seedbankId), originName: originName == null && nullToAbsent ? const Value.absent() : Value(originName), originPlace: originPlace == null && nullToAbsent ? const Value.absent() : Value(originPlace), abundance: abundance == null && nullToAbsent ? const Value.absent() : Value(abundance), preservationFormat: preservationFormat == null && nullToAbsent ? const Value.absent() : Value(preservationFormat), priceAmount: priceAmount == null && nullToAbsent ? const Value.absent() : Value(priceAmount), priceCurrency: priceCurrency == null && nullToAbsent ? const Value.absent() : Value(priceCurrency), ); } factory Lot.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Lot( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), varietyId: serializer.fromJson(json['varietyId']), type: $LotsTable.$convertertype.fromJson( serializer.fromJson(json['type']), ), harvestYear: serializer.fromJson(json['harvestYear']), harvestMonth: serializer.fromJson(json['harvestMonth']), quantityKind: serializer.fromJson(json['quantityKind']), quantityPrecise: serializer.fromJson(json['quantityPrecise']), quantityLabel: serializer.fromJson(json['quantityLabel']), presentation: $LotsTable.$converterpresentationn.fromJson( serializer.fromJson(json['presentation']), ), storageLocation: serializer.fromJson(json['storageLocation']), offerStatus: $LotsTable.$converterofferStatus.fromJson( serializer.fromJson(json['offerStatus']), ), seedbankId: serializer.fromJson(json['seedbankId']), originName: serializer.fromJson(json['originName']), originPlace: serializer.fromJson(json['originPlace']), abundance: $LotsTable.$converterabundancen.fromJson( serializer.fromJson(json['abundance']), ), preservationFormat: $LotsTable.$converterpreservationFormatn.fromJson( serializer.fromJson(json['preservationFormat']), ), priceAmount: serializer.fromJson(json['priceAmount']), priceCurrency: serializer.fromJson(json['priceCurrency']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'varietyId': serializer.toJson(varietyId), 'type': serializer.toJson($LotsTable.$convertertype.toJson(type)), 'harvestYear': serializer.toJson(harvestYear), 'harvestMonth': serializer.toJson(harvestMonth), 'quantityKind': serializer.toJson(quantityKind), 'quantityPrecise': serializer.toJson(quantityPrecise), 'quantityLabel': serializer.toJson(quantityLabel), 'presentation': serializer.toJson( $LotsTable.$converterpresentationn.toJson(presentation), ), 'storageLocation': serializer.toJson(storageLocation), 'offerStatus': serializer.toJson( $LotsTable.$converterofferStatus.toJson(offerStatus), ), 'seedbankId': serializer.toJson(seedbankId), 'originName': serializer.toJson(originName), 'originPlace': serializer.toJson(originPlace), 'abundance': serializer.toJson( $LotsTable.$converterabundancen.toJson(abundance), ), 'preservationFormat': serializer.toJson( $LotsTable.$converterpreservationFormatn.toJson(preservationFormat), ), 'priceAmount': serializer.toJson(priceAmount), 'priceCurrency': serializer.toJson(priceCurrency), }; } Lot copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, String? varietyId, LotType? type, Value harvestYear = const Value.absent(), Value harvestMonth = const Value.absent(), Value quantityKind = const Value.absent(), Value quantityPrecise = const Value.absent(), Value quantityLabel = const Value.absent(), Value presentation = const Value.absent(), Value storageLocation = const Value.absent(), OfferStatus? offerStatus, Value seedbankId = const Value.absent(), Value originName = const Value.absent(), Value originPlace = const Value.absent(), Value abundance = const Value.absent(), Value preservationFormat = const Value.absent(), Value priceAmount = const Value.absent(), Value priceCurrency = const Value.absent(), }) => Lot( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, varietyId: varietyId ?? this.varietyId, type: type ?? this.type, harvestYear: harvestYear.present ? harvestYear.value : this.harvestYear, harvestMonth: harvestMonth.present ? harvestMonth.value : this.harvestMonth, quantityKind: quantityKind.present ? quantityKind.value : this.quantityKind, quantityPrecise: quantityPrecise.present ? quantityPrecise.value : this.quantityPrecise, quantityLabel: quantityLabel.present ? quantityLabel.value : this.quantityLabel, presentation: presentation.present ? presentation.value : this.presentation, storageLocation: storageLocation.present ? storageLocation.value : this.storageLocation, offerStatus: offerStatus ?? this.offerStatus, seedbankId: seedbankId.present ? seedbankId.value : this.seedbankId, originName: originName.present ? originName.value : this.originName, originPlace: originPlace.present ? originPlace.value : this.originPlace, abundance: abundance.present ? abundance.value : this.abundance, preservationFormat: preservationFormat.present ? preservationFormat.value : this.preservationFormat, priceAmount: priceAmount.present ? priceAmount.value : this.priceAmount, priceCurrency: priceCurrency.present ? priceCurrency.value : this.priceCurrency, ); Lot copyWithCompanion(LotsCompanion data) { return Lot( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, varietyId: data.varietyId.present ? data.varietyId.value : this.varietyId, type: data.type.present ? data.type.value : this.type, harvestYear: data.harvestYear.present ? data.harvestYear.value : this.harvestYear, harvestMonth: data.harvestMonth.present ? data.harvestMonth.value : this.harvestMonth, quantityKind: data.quantityKind.present ? data.quantityKind.value : this.quantityKind, quantityPrecise: data.quantityPrecise.present ? data.quantityPrecise.value : this.quantityPrecise, quantityLabel: data.quantityLabel.present ? data.quantityLabel.value : this.quantityLabel, presentation: data.presentation.present ? data.presentation.value : this.presentation, storageLocation: data.storageLocation.present ? data.storageLocation.value : this.storageLocation, offerStatus: data.offerStatus.present ? data.offerStatus.value : this.offerStatus, seedbankId: data.seedbankId.present ? data.seedbankId.value : this.seedbankId, originName: data.originName.present ? data.originName.value : this.originName, originPlace: data.originPlace.present ? data.originPlace.value : this.originPlace, abundance: data.abundance.present ? data.abundance.value : this.abundance, preservationFormat: data.preservationFormat.present ? data.preservationFormat.value : this.preservationFormat, priceAmount: data.priceAmount.present ? data.priceAmount.value : this.priceAmount, priceCurrency: data.priceCurrency.present ? data.priceCurrency.value : this.priceCurrency, ); } @override String toString() { return (StringBuffer('Lot(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('varietyId: $varietyId, ') ..write('type: $type, ') ..write('harvestYear: $harvestYear, ') ..write('harvestMonth: $harvestMonth, ') ..write('quantityKind: $quantityKind, ') ..write('quantityPrecise: $quantityPrecise, ') ..write('quantityLabel: $quantityLabel, ') ..write('presentation: $presentation, ') ..write('storageLocation: $storageLocation, ') ..write('offerStatus: $offerStatus, ') ..write('seedbankId: $seedbankId, ') ..write('originName: $originName, ') ..write('originPlace: $originPlace, ') ..write('abundance: $abundance, ') ..write('preservationFormat: $preservationFormat, ') ..write('priceAmount: $priceAmount, ') ..write('priceCurrency: $priceCurrency') ..write(')')) .toString(); } @override int get hashCode => Object.hashAll([ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, varietyId, type, harvestYear, harvestMonth, quantityKind, quantityPrecise, quantityLabel, presentation, storageLocation, offerStatus, seedbankId, originName, originPlace, abundance, preservationFormat, priceAmount, priceCurrency, ]); @override bool operator ==(Object other) => identical(this, other) || (other is Lot && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.varietyId == this.varietyId && other.type == this.type && other.harvestYear == this.harvestYear && other.harvestMonth == this.harvestMonth && other.quantityKind == this.quantityKind && other.quantityPrecise == this.quantityPrecise && other.quantityLabel == this.quantityLabel && other.presentation == this.presentation && other.storageLocation == this.storageLocation && other.offerStatus == this.offerStatus && other.seedbankId == this.seedbankId && other.originName == this.originName && other.originPlace == this.originPlace && other.abundance == this.abundance && other.preservationFormat == this.preservationFormat && other.priceAmount == this.priceAmount && other.priceCurrency == this.priceCurrency); } class LotsCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value varietyId; final Value type; final Value harvestYear; final Value harvestMonth; final Value quantityKind; final Value quantityPrecise; final Value quantityLabel; final Value presentation; final Value storageLocation; final Value offerStatus; final Value seedbankId; final Value originName; final Value originPlace; final Value abundance; final Value preservationFormat; final Value priceAmount; final Value priceCurrency; final Value rowid; const LotsCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.varietyId = const Value.absent(), this.type = const Value.absent(), this.harvestYear = const Value.absent(), this.harvestMonth = const Value.absent(), this.quantityKind = const Value.absent(), this.quantityPrecise = const Value.absent(), this.quantityLabel = const Value.absent(), this.presentation = const Value.absent(), this.storageLocation = const Value.absent(), this.offerStatus = const Value.absent(), this.seedbankId = const Value.absent(), this.originName = const Value.absent(), this.originPlace = const Value.absent(), this.abundance = const Value.absent(), this.preservationFormat = const Value.absent(), this.priceAmount = const Value.absent(), this.priceCurrency = const Value.absent(), this.rowid = const Value.absent(), }); LotsCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required String varietyId, this.type = const Value.absent(), this.harvestYear = const Value.absent(), this.harvestMonth = const Value.absent(), this.quantityKind = const Value.absent(), this.quantityPrecise = const Value.absent(), this.quantityLabel = const Value.absent(), this.presentation = const Value.absent(), this.storageLocation = const Value.absent(), this.offerStatus = const Value.absent(), this.seedbankId = const Value.absent(), this.originName = const Value.absent(), this.originPlace = const Value.absent(), this.abundance = const Value.absent(), this.preservationFormat = const Value.absent(), this.priceAmount = const Value.absent(), this.priceCurrency = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), varietyId = Value(varietyId); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? varietyId, Expression? type, Expression? harvestYear, Expression? harvestMonth, Expression? quantityKind, Expression? quantityPrecise, Expression? quantityLabel, Expression? presentation, Expression? storageLocation, Expression? offerStatus, Expression? seedbankId, Expression? originName, Expression? originPlace, Expression? abundance, Expression? preservationFormat, Expression? priceAmount, Expression? priceCurrency, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (varietyId != null) 'variety_id': varietyId, if (type != null) 'type': type, if (harvestYear != null) 'harvest_year': harvestYear, if (harvestMonth != null) 'harvest_month': harvestMonth, if (quantityKind != null) 'quantity_kind': quantityKind, if (quantityPrecise != null) 'quantity_precise': quantityPrecise, if (quantityLabel != null) 'quantity_label': quantityLabel, if (presentation != null) 'presentation': presentation, if (storageLocation != null) 'storage_location': storageLocation, if (offerStatus != null) 'offer_status': offerStatus, if (seedbankId != null) 'seedbank_id': seedbankId, if (originName != null) 'origin_name': originName, if (originPlace != null) 'origin_place': originPlace, if (abundance != null) 'abundance': abundance, if (preservationFormat != null) 'preservation_format': preservationFormat, if (priceAmount != null) 'price_amount': priceAmount, if (priceCurrency != null) 'price_currency': priceCurrency, if (rowid != null) 'rowid': rowid, }); } LotsCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? varietyId, Value? type, Value? harvestYear, Value? harvestMonth, Value? quantityKind, Value? quantityPrecise, Value? quantityLabel, Value? presentation, Value? storageLocation, Value? offerStatus, Value? seedbankId, Value? originName, Value? originPlace, Value? abundance, Value? preservationFormat, Value? priceAmount, Value? priceCurrency, Value? rowid, }) { return LotsCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, varietyId: varietyId ?? this.varietyId, type: type ?? this.type, harvestYear: harvestYear ?? this.harvestYear, harvestMonth: harvestMonth ?? this.harvestMonth, quantityKind: quantityKind ?? this.quantityKind, quantityPrecise: quantityPrecise ?? this.quantityPrecise, quantityLabel: quantityLabel ?? this.quantityLabel, presentation: presentation ?? this.presentation, storageLocation: storageLocation ?? this.storageLocation, offerStatus: offerStatus ?? this.offerStatus, seedbankId: seedbankId ?? this.seedbankId, originName: originName ?? this.originName, originPlace: originPlace ?? this.originPlace, abundance: abundance ?? this.abundance, preservationFormat: preservationFormat ?? this.preservationFormat, priceAmount: priceAmount ?? this.priceAmount, priceCurrency: priceCurrency ?? this.priceCurrency, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (varietyId.present) { map['variety_id'] = Variable(varietyId.value); } if (type.present) { map['type'] = Variable( $LotsTable.$convertertype.toSql(type.value), ); } if (harvestYear.present) { map['harvest_year'] = Variable(harvestYear.value); } if (harvestMonth.present) { map['harvest_month'] = Variable(harvestMonth.value); } if (quantityKind.present) { map['quantity_kind'] = Variable(quantityKind.value); } if (quantityPrecise.present) { map['quantity_precise'] = Variable(quantityPrecise.value); } if (quantityLabel.present) { map['quantity_label'] = Variable(quantityLabel.value); } if (presentation.present) { map['presentation'] = Variable( $LotsTable.$converterpresentationn.toSql(presentation.value), ); } if (storageLocation.present) { map['storage_location'] = Variable(storageLocation.value); } if (offerStatus.present) { map['offer_status'] = Variable( $LotsTable.$converterofferStatus.toSql(offerStatus.value), ); } if (seedbankId.present) { map['seedbank_id'] = Variable(seedbankId.value); } if (originName.present) { map['origin_name'] = Variable(originName.value); } if (originPlace.present) { map['origin_place'] = Variable(originPlace.value); } if (abundance.present) { map['abundance'] = Variable( $LotsTable.$converterabundancen.toSql(abundance.value), ); } if (preservationFormat.present) { map['preservation_format'] = Variable( $LotsTable.$converterpreservationFormatn.toSql( preservationFormat.value, ), ); } if (priceAmount.present) { map['price_amount'] = Variable(priceAmount.value); } if (priceCurrency.present) { map['price_currency'] = Variable(priceCurrency.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('LotsCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('varietyId: $varietyId, ') ..write('type: $type, ') ..write('harvestYear: $harvestYear, ') ..write('harvestMonth: $harvestMonth, ') ..write('quantityKind: $quantityKind, ') ..write('quantityPrecise: $quantityPrecise, ') ..write('quantityLabel: $quantityLabel, ') ..write('presentation: $presentation, ') ..write('storageLocation: $storageLocation, ') ..write('offerStatus: $offerStatus, ') ..write('seedbankId: $seedbankId, ') ..write('originName: $originName, ') ..write('originPlace: $originPlace, ') ..write('abundance: $abundance, ') ..write('preservationFormat: $preservationFormat, ') ..write('priceAmount: $priceAmount, ') ..write('priceCurrency: $priceCurrency, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $GerminationTestsTable extends GerminationTests with TableInfo<$GerminationTestsTable, GerminationTest> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $GerminationTestsTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _lotIdMeta = const VerificationMeta('lotId'); @override late final GeneratedColumn lotId = GeneratedColumn( 'lot_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _testedOnMeta = const VerificationMeta( 'testedOn', ); @override late final GeneratedColumn testedOn = GeneratedColumn( 'tested_on', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _sampleSizeMeta = const VerificationMeta( 'sampleSize', ); @override late final GeneratedColumn sampleSize = GeneratedColumn( 'sample_size', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _germinatedCountMeta = const VerificationMeta( 'germinatedCount', ); @override late final GeneratedColumn germinatedCount = GeneratedColumn( 'germinated_count', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _notesMeta = const VerificationMeta('notes'); @override late final GeneratedColumn notes = GeneratedColumn( 'notes', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, lotId, testedOn, sampleSize, germinatedCount, notes, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'germination_tests'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('lot_id')) { context.handle( _lotIdMeta, lotId.isAcceptableOrUnknown(data['lot_id']!, _lotIdMeta), ); } else if (isInserting) { context.missing(_lotIdMeta); } if (data.containsKey('tested_on')) { context.handle( _testedOnMeta, testedOn.isAcceptableOrUnknown(data['tested_on']!, _testedOnMeta), ); } if (data.containsKey('sample_size')) { context.handle( _sampleSizeMeta, sampleSize.isAcceptableOrUnknown(data['sample_size']!, _sampleSizeMeta), ); } if (data.containsKey('germinated_count')) { context.handle( _germinatedCountMeta, germinatedCount.isAcceptableOrUnknown( data['germinated_count']!, _germinatedCountMeta, ), ); } if (data.containsKey('notes')) { context.handle( _notesMeta, notes.isAcceptableOrUnknown(data['notes']!, _notesMeta), ); } return context; } @override Set get $primaryKey => {id}; @override GerminationTest map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return GerminationTest( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, lotId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}lot_id'], )!, testedOn: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}tested_on'], ), sampleSize: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}sample_size'], ), germinatedCount: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}germinated_count'], ), notes: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}notes'], ), ); } @override $GerminationTestsTable createAlias(String alias) { return $GerminationTestsTable(attachedDatabase, alias); } } class GerminationTest extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final String lotId; final int? testedOn; final int? sampleSize; final int? germinatedCount; final String? notes; const GerminationTest({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.lotId, this.testedOn, this.sampleSize, this.germinatedCount, this.notes, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); map['lot_id'] = Variable(lotId); if (!nullToAbsent || testedOn != null) { map['tested_on'] = Variable(testedOn); } if (!nullToAbsent || sampleSize != null) { map['sample_size'] = Variable(sampleSize); } if (!nullToAbsent || germinatedCount != null) { map['germinated_count'] = Variable(germinatedCount); } if (!nullToAbsent || notes != null) { map['notes'] = Variable(notes); } return map; } GerminationTestsCompanion toCompanion(bool nullToAbsent) { return GerminationTestsCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), lotId: Value(lotId), testedOn: testedOn == null && nullToAbsent ? const Value.absent() : Value(testedOn), sampleSize: sampleSize == null && nullToAbsent ? const Value.absent() : Value(sampleSize), germinatedCount: germinatedCount == null && nullToAbsent ? const Value.absent() : Value(germinatedCount), notes: notes == null && nullToAbsent ? const Value.absent() : Value(notes), ); } factory GerminationTest.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return GerminationTest( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), lotId: serializer.fromJson(json['lotId']), testedOn: serializer.fromJson(json['testedOn']), sampleSize: serializer.fromJson(json['sampleSize']), germinatedCount: serializer.fromJson(json['germinatedCount']), notes: serializer.fromJson(json['notes']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'lotId': serializer.toJson(lotId), 'testedOn': serializer.toJson(testedOn), 'sampleSize': serializer.toJson(sampleSize), 'germinatedCount': serializer.toJson(germinatedCount), 'notes': serializer.toJson(notes), }; } GerminationTest copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, String? lotId, Value testedOn = const Value.absent(), Value sampleSize = const Value.absent(), Value germinatedCount = const Value.absent(), Value notes = const Value.absent(), }) => GerminationTest( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, lotId: lotId ?? this.lotId, testedOn: testedOn.present ? testedOn.value : this.testedOn, sampleSize: sampleSize.present ? sampleSize.value : this.sampleSize, germinatedCount: germinatedCount.present ? germinatedCount.value : this.germinatedCount, notes: notes.present ? notes.value : this.notes, ); GerminationTest copyWithCompanion(GerminationTestsCompanion data) { return GerminationTest( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, lotId: data.lotId.present ? data.lotId.value : this.lotId, testedOn: data.testedOn.present ? data.testedOn.value : this.testedOn, sampleSize: data.sampleSize.present ? data.sampleSize.value : this.sampleSize, germinatedCount: data.germinatedCount.present ? data.germinatedCount.value : this.germinatedCount, notes: data.notes.present ? data.notes.value : this.notes, ); } @override String toString() { return (StringBuffer('GerminationTest(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('lotId: $lotId, ') ..write('testedOn: $testedOn, ') ..write('sampleSize: $sampleSize, ') ..write('germinatedCount: $germinatedCount, ') ..write('notes: $notes') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, lotId, testedOn, sampleSize, germinatedCount, notes, ); @override bool operator ==(Object other) => identical(this, other) || (other is GerminationTest && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.lotId == this.lotId && other.testedOn == this.testedOn && other.sampleSize == this.sampleSize && other.germinatedCount == this.germinatedCount && other.notes == this.notes); } class GerminationTestsCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value lotId; final Value testedOn; final Value sampleSize; final Value germinatedCount; final Value notes; final Value rowid; const GerminationTestsCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.lotId = const Value.absent(), this.testedOn = const Value.absent(), this.sampleSize = const Value.absent(), this.germinatedCount = const Value.absent(), this.notes = const Value.absent(), this.rowid = const Value.absent(), }); GerminationTestsCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required String lotId, this.testedOn = const Value.absent(), this.sampleSize = const Value.absent(), this.germinatedCount = const Value.absent(), this.notes = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), lotId = Value(lotId); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? lotId, Expression? testedOn, Expression? sampleSize, Expression? germinatedCount, Expression? notes, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (lotId != null) 'lot_id': lotId, if (testedOn != null) 'tested_on': testedOn, if (sampleSize != null) 'sample_size': sampleSize, if (germinatedCount != null) 'germinated_count': germinatedCount, if (notes != null) 'notes': notes, if (rowid != null) 'rowid': rowid, }); } GerminationTestsCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? lotId, Value? testedOn, Value? sampleSize, Value? germinatedCount, Value? notes, Value? rowid, }) { return GerminationTestsCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, lotId: lotId ?? this.lotId, testedOn: testedOn ?? this.testedOn, sampleSize: sampleSize ?? this.sampleSize, germinatedCount: germinatedCount ?? this.germinatedCount, notes: notes ?? this.notes, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (lotId.present) { map['lot_id'] = Variable(lotId.value); } if (testedOn.present) { map['tested_on'] = Variable(testedOn.value); } if (sampleSize.present) { map['sample_size'] = Variable(sampleSize.value); } if (germinatedCount.present) { map['germinated_count'] = Variable(germinatedCount.value); } if (notes.present) { map['notes'] = Variable(notes.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('GerminationTestsCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('lotId: $lotId, ') ..write('testedOn: $testedOn, ') ..write('sampleSize: $sampleSize, ') ..write('germinatedCount: $germinatedCount, ') ..write('notes: $notes, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $ConditionChecksTable extends ConditionChecks with TableInfo<$ConditionChecksTable, ConditionCheck> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $ConditionChecksTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _lotIdMeta = const VerificationMeta('lotId'); @override late final GeneratedColumn lotId = GeneratedColumn( 'lot_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _checkedOnMeta = const VerificationMeta( 'checkedOn', ); @override late final GeneratedColumn checkedOn = GeneratedColumn( 'checked_on', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _containerCountMeta = const VerificationMeta( 'containerCount', ); @override late final GeneratedColumn containerCount = GeneratedColumn( 'container_count', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); @override late final GeneratedColumnWithTypeConverter desiccantState = GeneratedColumn( 'desiccant_state', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ).withConverter( $ConditionChecksTable.$converterdesiccantStaten, ); static const VerificationMeta _notesMeta = const VerificationMeta('notes'); @override late final GeneratedColumn notes = GeneratedColumn( 'notes', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, lotId, checkedOn, containerCount, desiccantState, notes, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'condition_checks'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('lot_id')) { context.handle( _lotIdMeta, lotId.isAcceptableOrUnknown(data['lot_id']!, _lotIdMeta), ); } else if (isInserting) { context.missing(_lotIdMeta); } if (data.containsKey('checked_on')) { context.handle( _checkedOnMeta, checkedOn.isAcceptableOrUnknown(data['checked_on']!, _checkedOnMeta), ); } if (data.containsKey('container_count')) { context.handle( _containerCountMeta, containerCount.isAcceptableOrUnknown( data['container_count']!, _containerCountMeta, ), ); } if (data.containsKey('notes')) { context.handle( _notesMeta, notes.isAcceptableOrUnknown(data['notes']!, _notesMeta), ); } return context; } @override Set get $primaryKey => {id}; @override ConditionCheck map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return ConditionCheck( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, lotId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}lot_id'], )!, checkedOn: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}checked_on'], ), containerCount: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}container_count'], ), desiccantState: $ConditionChecksTable.$converterdesiccantStaten.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}desiccant_state'], ), ), notes: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}notes'], ), ); } @override $ConditionChecksTable createAlias(String alias) { return $ConditionChecksTable(attachedDatabase, alias); } static JsonTypeConverter2 $converterdesiccantState = const EnumNameConverter( DesiccantState.values, ); static JsonTypeConverter2 $converterdesiccantStaten = JsonTypeConverter2.asNullable( $converterdesiccantState, ); } class ConditionCheck extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final String lotId; final int? checkedOn; final int? containerCount; final DesiccantState? desiccantState; final String? notes; const ConditionCheck({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.lotId, this.checkedOn, this.containerCount, this.desiccantState, this.notes, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); map['lot_id'] = Variable(lotId); if (!nullToAbsent || checkedOn != null) { map['checked_on'] = Variable(checkedOn); } if (!nullToAbsent || containerCount != null) { map['container_count'] = Variable(containerCount); } if (!nullToAbsent || desiccantState != null) { map['desiccant_state'] = Variable( $ConditionChecksTable.$converterdesiccantStaten.toSql(desiccantState), ); } if (!nullToAbsent || notes != null) { map['notes'] = Variable(notes); } return map; } ConditionChecksCompanion toCompanion(bool nullToAbsent) { return ConditionChecksCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), lotId: Value(lotId), checkedOn: checkedOn == null && nullToAbsent ? const Value.absent() : Value(checkedOn), containerCount: containerCount == null && nullToAbsent ? const Value.absent() : Value(containerCount), desiccantState: desiccantState == null && nullToAbsent ? const Value.absent() : Value(desiccantState), notes: notes == null && nullToAbsent ? const Value.absent() : Value(notes), ); } factory ConditionCheck.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return ConditionCheck( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), lotId: serializer.fromJson(json['lotId']), checkedOn: serializer.fromJson(json['checkedOn']), containerCount: serializer.fromJson(json['containerCount']), desiccantState: $ConditionChecksTable.$converterdesiccantStaten.fromJson( serializer.fromJson(json['desiccantState']), ), notes: serializer.fromJson(json['notes']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'lotId': serializer.toJson(lotId), 'checkedOn': serializer.toJson(checkedOn), 'containerCount': serializer.toJson(containerCount), 'desiccantState': serializer.toJson( $ConditionChecksTable.$converterdesiccantStaten.toJson(desiccantState), ), 'notes': serializer.toJson(notes), }; } ConditionCheck copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, String? lotId, Value checkedOn = const Value.absent(), Value containerCount = const Value.absent(), Value desiccantState = const Value.absent(), Value notes = const Value.absent(), }) => ConditionCheck( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, lotId: lotId ?? this.lotId, checkedOn: checkedOn.present ? checkedOn.value : this.checkedOn, containerCount: containerCount.present ? containerCount.value : this.containerCount, desiccantState: desiccantState.present ? desiccantState.value : this.desiccantState, notes: notes.present ? notes.value : this.notes, ); ConditionCheck copyWithCompanion(ConditionChecksCompanion data) { return ConditionCheck( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, lotId: data.lotId.present ? data.lotId.value : this.lotId, checkedOn: data.checkedOn.present ? data.checkedOn.value : this.checkedOn, containerCount: data.containerCount.present ? data.containerCount.value : this.containerCount, desiccantState: data.desiccantState.present ? data.desiccantState.value : this.desiccantState, notes: data.notes.present ? data.notes.value : this.notes, ); } @override String toString() { return (StringBuffer('ConditionCheck(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('lotId: $lotId, ') ..write('checkedOn: $checkedOn, ') ..write('containerCount: $containerCount, ') ..write('desiccantState: $desiccantState, ') ..write('notes: $notes') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, lotId, checkedOn, containerCount, desiccantState, notes, ); @override bool operator ==(Object other) => identical(this, other) || (other is ConditionCheck && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.lotId == this.lotId && other.checkedOn == this.checkedOn && other.containerCount == this.containerCount && other.desiccantState == this.desiccantState && other.notes == this.notes); } class ConditionChecksCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value lotId; final Value checkedOn; final Value containerCount; final Value desiccantState; final Value notes; final Value rowid; const ConditionChecksCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.lotId = const Value.absent(), this.checkedOn = const Value.absent(), this.containerCount = const Value.absent(), this.desiccantState = const Value.absent(), this.notes = const Value.absent(), this.rowid = const Value.absent(), }); ConditionChecksCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required String lotId, this.checkedOn = const Value.absent(), this.containerCount = const Value.absent(), this.desiccantState = const Value.absent(), this.notes = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), lotId = Value(lotId); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? lotId, Expression? checkedOn, Expression? containerCount, Expression? desiccantState, Expression? notes, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (lotId != null) 'lot_id': lotId, if (checkedOn != null) 'checked_on': checkedOn, if (containerCount != null) 'container_count': containerCount, if (desiccantState != null) 'desiccant_state': desiccantState, if (notes != null) 'notes': notes, if (rowid != null) 'rowid': rowid, }); } ConditionChecksCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? lotId, Value? checkedOn, Value? containerCount, Value? desiccantState, Value? notes, Value? rowid, }) { return ConditionChecksCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, lotId: lotId ?? this.lotId, checkedOn: checkedOn ?? this.checkedOn, containerCount: containerCount ?? this.containerCount, desiccantState: desiccantState ?? this.desiccantState, notes: notes ?? this.notes, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (lotId.present) { map['lot_id'] = Variable(lotId.value); } if (checkedOn.present) { map['checked_on'] = Variable(checkedOn.value); } if (containerCount.present) { map['container_count'] = Variable(containerCount.value); } if (desiccantState.present) { map['desiccant_state'] = Variable( $ConditionChecksTable.$converterdesiccantStaten.toSql( desiccantState.value, ), ); } if (notes.present) { map['notes'] = Variable(notes.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('ConditionChecksCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('lotId: $lotId, ') ..write('checkedOn: $checkedOn, ') ..write('containerCount: $containerCount, ') ..write('desiccantState: $desiccantState, ') ..write('notes: $notes, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $MovementsTable extends Movements with TableInfo<$MovementsTable, Movement> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $MovementsTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _lotIdMeta = const VerificationMeta('lotId'); @override late final GeneratedColumn lotId = GeneratedColumn( 'lot_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); @override late final GeneratedColumnWithTypeConverter type = GeneratedColumn( 'type', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ).withConverter($MovementsTable.$convertertype); static const VerificationMeta _occurredOnMeta = const VerificationMeta( 'occurredOn', ); @override late final GeneratedColumn occurredOn = GeneratedColumn( 'occurred_on', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _counterpartyIdMeta = const VerificationMeta( 'counterpartyId', ); @override late final GeneratedColumn counterpartyId = GeneratedColumn( 'counterparty_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _quantityKindMeta = const VerificationMeta( 'quantityKind', ); @override late final GeneratedColumn quantityKind = GeneratedColumn( 'quantity_kind', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _quantityPreciseMeta = const VerificationMeta( 'quantityPrecise', ); @override late final GeneratedColumn quantityPrecise = GeneratedColumn( 'quantity_precise', aliasedName, true, type: DriftSqlType.double, requiredDuringInsert: false, ); static const VerificationMeta _quantityLabelMeta = const VerificationMeta( 'quantityLabel', ); @override late final GeneratedColumn quantityLabel = GeneratedColumn( 'quantity_label', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _parentMovementIdMeta = const VerificationMeta( 'parentMovementId', ); @override late final GeneratedColumn parentMovementId = GeneratedColumn( 'parent_movement_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _plantareIdMeta = const VerificationMeta( 'plantareId', ); @override late final GeneratedColumn plantareId = GeneratedColumn( 'plantare_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _notesMeta = const VerificationMeta('notes'); @override late final GeneratedColumn notes = GeneratedColumn( 'notes', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, lastAuthor, schemaRowVersion, lotId, type, occurredOn, counterpartyId, quantityKind, quantityPrecise, quantityLabel, parentMovementId, plantareId, notes, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'movements'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('lot_id')) { context.handle( _lotIdMeta, lotId.isAcceptableOrUnknown(data['lot_id']!, _lotIdMeta), ); } else if (isInserting) { context.missing(_lotIdMeta); } if (data.containsKey('occurred_on')) { context.handle( _occurredOnMeta, occurredOn.isAcceptableOrUnknown(data['occurred_on']!, _occurredOnMeta), ); } if (data.containsKey('counterparty_id')) { context.handle( _counterpartyIdMeta, counterpartyId.isAcceptableOrUnknown( data['counterparty_id']!, _counterpartyIdMeta, ), ); } if (data.containsKey('quantity_kind')) { context.handle( _quantityKindMeta, quantityKind.isAcceptableOrUnknown( data['quantity_kind']!, _quantityKindMeta, ), ); } if (data.containsKey('quantity_precise')) { context.handle( _quantityPreciseMeta, quantityPrecise.isAcceptableOrUnknown( data['quantity_precise']!, _quantityPreciseMeta, ), ); } if (data.containsKey('quantity_label')) { context.handle( _quantityLabelMeta, quantityLabel.isAcceptableOrUnknown( data['quantity_label']!, _quantityLabelMeta, ), ); } if (data.containsKey('parent_movement_id')) { context.handle( _parentMovementIdMeta, parentMovementId.isAcceptableOrUnknown( data['parent_movement_id']!, _parentMovementIdMeta, ), ); } if (data.containsKey('plantare_id')) { context.handle( _plantareIdMeta, plantareId.isAcceptableOrUnknown(data['plantare_id']!, _plantareIdMeta), ); } if (data.containsKey('notes')) { context.handle( _notesMeta, notes.isAcceptableOrUnknown(data['notes']!, _notesMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Movement map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Movement( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, lotId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}lot_id'], )!, type: $MovementsTable.$convertertype.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}type'], )!, ), occurredOn: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}occurred_on'], ), counterpartyId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}counterparty_id'], ), quantityKind: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}quantity_kind'], ), quantityPrecise: attachedDatabase.typeMapping.read( DriftSqlType.double, data['${effectivePrefix}quantity_precise'], ), quantityLabel: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}quantity_label'], ), parentMovementId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}parent_movement_id'], ), plantareId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}plantare_id'], ), notes: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}notes'], ), ); } @override $MovementsTable createAlias(String alias) { return $MovementsTable(attachedDatabase, alias); } static JsonTypeConverter2 $convertertype = const EnumNameConverter(MovementType.values); } class Movement extends DataClass implements Insertable { final String id; final int createdAt; final String lastAuthor; final int schemaRowVersion; final String lotId; final MovementType type; final int? occurredOn; final String? counterpartyId; final String? quantityKind; final double? quantityPrecise; final String? quantityLabel; final String? parentMovementId; final String? plantareId; final String? notes; const Movement({ required this.id, required this.createdAt, required this.lastAuthor, required this.schemaRowVersion, required this.lotId, required this.type, this.occurredOn, this.counterpartyId, this.quantityKind, this.quantityPrecise, this.quantityLabel, this.parentMovementId, this.plantareId, this.notes, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['last_author'] = Variable(lastAuthor); map['schema_row_version'] = Variable(schemaRowVersion); map['lot_id'] = Variable(lotId); { map['type'] = Variable( $MovementsTable.$convertertype.toSql(type), ); } if (!nullToAbsent || occurredOn != null) { map['occurred_on'] = Variable(occurredOn); } if (!nullToAbsent || counterpartyId != null) { map['counterparty_id'] = Variable(counterpartyId); } if (!nullToAbsent || quantityKind != null) { map['quantity_kind'] = Variable(quantityKind); } if (!nullToAbsent || quantityPrecise != null) { map['quantity_precise'] = Variable(quantityPrecise); } if (!nullToAbsent || quantityLabel != null) { map['quantity_label'] = Variable(quantityLabel); } if (!nullToAbsent || parentMovementId != null) { map['parent_movement_id'] = Variable(parentMovementId); } if (!nullToAbsent || plantareId != null) { map['plantare_id'] = Variable(plantareId); } if (!nullToAbsent || notes != null) { map['notes'] = Variable(notes); } return map; } MovementsCompanion toCompanion(bool nullToAbsent) { return MovementsCompanion( id: Value(id), createdAt: Value(createdAt), lastAuthor: Value(lastAuthor), schemaRowVersion: Value(schemaRowVersion), lotId: Value(lotId), type: Value(type), occurredOn: occurredOn == null && nullToAbsent ? const Value.absent() : Value(occurredOn), counterpartyId: counterpartyId == null && nullToAbsent ? const Value.absent() : Value(counterpartyId), quantityKind: quantityKind == null && nullToAbsent ? const Value.absent() : Value(quantityKind), quantityPrecise: quantityPrecise == null && nullToAbsent ? const Value.absent() : Value(quantityPrecise), quantityLabel: quantityLabel == null && nullToAbsent ? const Value.absent() : Value(quantityLabel), parentMovementId: parentMovementId == null && nullToAbsent ? const Value.absent() : Value(parentMovementId), plantareId: plantareId == null && nullToAbsent ? const Value.absent() : Value(plantareId), notes: notes == null && nullToAbsent ? const Value.absent() : Value(notes), ); } factory Movement.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Movement( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), lotId: serializer.fromJson(json['lotId']), type: $MovementsTable.$convertertype.fromJson( serializer.fromJson(json['type']), ), occurredOn: serializer.fromJson(json['occurredOn']), counterpartyId: serializer.fromJson(json['counterpartyId']), quantityKind: serializer.fromJson(json['quantityKind']), quantityPrecise: serializer.fromJson(json['quantityPrecise']), quantityLabel: serializer.fromJson(json['quantityLabel']), parentMovementId: serializer.fromJson(json['parentMovementId']), plantareId: serializer.fromJson(json['plantareId']), notes: serializer.fromJson(json['notes']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'lastAuthor': serializer.toJson(lastAuthor), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'lotId': serializer.toJson(lotId), 'type': serializer.toJson( $MovementsTable.$convertertype.toJson(type), ), 'occurredOn': serializer.toJson(occurredOn), 'counterpartyId': serializer.toJson(counterpartyId), 'quantityKind': serializer.toJson(quantityKind), 'quantityPrecise': serializer.toJson(quantityPrecise), 'quantityLabel': serializer.toJson(quantityLabel), 'parentMovementId': serializer.toJson(parentMovementId), 'plantareId': serializer.toJson(plantareId), 'notes': serializer.toJson(notes), }; } Movement copyWith({ String? id, int? createdAt, String? lastAuthor, int? schemaRowVersion, String? lotId, MovementType? type, Value occurredOn = const Value.absent(), Value counterpartyId = const Value.absent(), Value quantityKind = const Value.absent(), Value quantityPrecise = const Value.absent(), Value quantityLabel = const Value.absent(), Value parentMovementId = const Value.absent(), Value plantareId = const Value.absent(), Value notes = const Value.absent(), }) => Movement( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, lastAuthor: lastAuthor ?? this.lastAuthor, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, lotId: lotId ?? this.lotId, type: type ?? this.type, occurredOn: occurredOn.present ? occurredOn.value : this.occurredOn, counterpartyId: counterpartyId.present ? counterpartyId.value : this.counterpartyId, quantityKind: quantityKind.present ? quantityKind.value : this.quantityKind, quantityPrecise: quantityPrecise.present ? quantityPrecise.value : this.quantityPrecise, quantityLabel: quantityLabel.present ? quantityLabel.value : this.quantityLabel, parentMovementId: parentMovementId.present ? parentMovementId.value : this.parentMovementId, plantareId: plantareId.present ? plantareId.value : this.plantareId, notes: notes.present ? notes.value : this.notes, ); Movement copyWithCompanion(MovementsCompanion data) { return Movement( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, lotId: data.lotId.present ? data.lotId.value : this.lotId, type: data.type.present ? data.type.value : this.type, occurredOn: data.occurredOn.present ? data.occurredOn.value : this.occurredOn, counterpartyId: data.counterpartyId.present ? data.counterpartyId.value : this.counterpartyId, quantityKind: data.quantityKind.present ? data.quantityKind.value : this.quantityKind, quantityPrecise: data.quantityPrecise.present ? data.quantityPrecise.value : this.quantityPrecise, quantityLabel: data.quantityLabel.present ? data.quantityLabel.value : this.quantityLabel, parentMovementId: data.parentMovementId.present ? data.parentMovementId.value : this.parentMovementId, plantareId: data.plantareId.present ? data.plantareId.value : this.plantareId, notes: data.notes.present ? data.notes.value : this.notes, ); } @override String toString() { return (StringBuffer('Movement(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('lotId: $lotId, ') ..write('type: $type, ') ..write('occurredOn: $occurredOn, ') ..write('counterpartyId: $counterpartyId, ') ..write('quantityKind: $quantityKind, ') ..write('quantityPrecise: $quantityPrecise, ') ..write('quantityLabel: $quantityLabel, ') ..write('parentMovementId: $parentMovementId, ') ..write('plantareId: $plantareId, ') ..write('notes: $notes') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, lastAuthor, schemaRowVersion, lotId, type, occurredOn, counterpartyId, quantityKind, quantityPrecise, quantityLabel, parentMovementId, plantareId, notes, ); @override bool operator ==(Object other) => identical(this, other) || (other is Movement && other.id == this.id && other.createdAt == this.createdAt && other.lastAuthor == this.lastAuthor && other.schemaRowVersion == this.schemaRowVersion && other.lotId == this.lotId && other.type == this.type && other.occurredOn == this.occurredOn && other.counterpartyId == this.counterpartyId && other.quantityKind == this.quantityKind && other.quantityPrecise == this.quantityPrecise && other.quantityLabel == this.quantityLabel && other.parentMovementId == this.parentMovementId && other.plantareId == this.plantareId && other.notes == this.notes); } class MovementsCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value lastAuthor; final Value schemaRowVersion; final Value lotId; final Value type; final Value occurredOn; final Value counterpartyId; final Value quantityKind; final Value quantityPrecise; final Value quantityLabel; final Value parentMovementId; final Value plantareId; final Value notes; final Value rowid; const MovementsCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.lotId = const Value.absent(), this.type = const Value.absent(), this.occurredOn = const Value.absent(), this.counterpartyId = const Value.absent(), this.quantityKind = const Value.absent(), this.quantityPrecise = const Value.absent(), this.quantityLabel = const Value.absent(), this.parentMovementId = const Value.absent(), this.plantareId = const Value.absent(), this.notes = const Value.absent(), this.rowid = const Value.absent(), }); MovementsCompanion.insert({ required String id, required int createdAt, required String lastAuthor, this.schemaRowVersion = const Value.absent(), required String lotId, required MovementType type, this.occurredOn = const Value.absent(), this.counterpartyId = const Value.absent(), this.quantityKind = const Value.absent(), this.quantityPrecise = const Value.absent(), this.quantityLabel = const Value.absent(), this.parentMovementId = const Value.absent(), this.plantareId = const Value.absent(), this.notes = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), lastAuthor = Value(lastAuthor), lotId = Value(lotId), type = Value(type); static Insertable custom({ Expression? id, Expression? createdAt, Expression? lastAuthor, Expression? schemaRowVersion, Expression? lotId, Expression? type, Expression? occurredOn, Expression? counterpartyId, Expression? quantityKind, Expression? quantityPrecise, Expression? quantityLabel, Expression? parentMovementId, Expression? plantareId, Expression? notes, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (lastAuthor != null) 'last_author': lastAuthor, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (lotId != null) 'lot_id': lotId, if (type != null) 'type': type, if (occurredOn != null) 'occurred_on': occurredOn, if (counterpartyId != null) 'counterparty_id': counterpartyId, if (quantityKind != null) 'quantity_kind': quantityKind, if (quantityPrecise != null) 'quantity_precise': quantityPrecise, if (quantityLabel != null) 'quantity_label': quantityLabel, if (parentMovementId != null) 'parent_movement_id': parentMovementId, if (plantareId != null) 'plantare_id': plantareId, if (notes != null) 'notes': notes, if (rowid != null) 'rowid': rowid, }); } MovementsCompanion copyWith({ Value? id, Value? createdAt, Value? lastAuthor, Value? schemaRowVersion, Value? lotId, Value? type, Value? occurredOn, Value? counterpartyId, Value? quantityKind, Value? quantityPrecise, Value? quantityLabel, Value? parentMovementId, Value? plantareId, Value? notes, Value? rowid, }) { return MovementsCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, lastAuthor: lastAuthor ?? this.lastAuthor, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, lotId: lotId ?? this.lotId, type: type ?? this.type, occurredOn: occurredOn ?? this.occurredOn, counterpartyId: counterpartyId ?? this.counterpartyId, quantityKind: quantityKind ?? this.quantityKind, quantityPrecise: quantityPrecise ?? this.quantityPrecise, quantityLabel: quantityLabel ?? this.quantityLabel, parentMovementId: parentMovementId ?? this.parentMovementId, plantareId: plantareId ?? this.plantareId, notes: notes ?? this.notes, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (lotId.present) { map['lot_id'] = Variable(lotId.value); } if (type.present) { map['type'] = Variable( $MovementsTable.$convertertype.toSql(type.value), ); } if (occurredOn.present) { map['occurred_on'] = Variable(occurredOn.value); } if (counterpartyId.present) { map['counterparty_id'] = Variable(counterpartyId.value); } if (quantityKind.present) { map['quantity_kind'] = Variable(quantityKind.value); } if (quantityPrecise.present) { map['quantity_precise'] = Variable(quantityPrecise.value); } if (quantityLabel.present) { map['quantity_label'] = Variable(quantityLabel.value); } if (parentMovementId.present) { map['parent_movement_id'] = Variable(parentMovementId.value); } if (plantareId.present) { map['plantare_id'] = Variable(plantareId.value); } if (notes.present) { map['notes'] = Variable(notes.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('MovementsCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('lotId: $lotId, ') ..write('type: $type, ') ..write('occurredOn: $occurredOn, ') ..write('counterpartyId: $counterpartyId, ') ..write('quantityKind: $quantityKind, ') ..write('quantityPrecise: $quantityPrecise, ') ..write('quantityLabel: $quantityLabel, ') ..write('parentMovementId: $parentMovementId, ') ..write('plantareId: $plantareId, ') ..write('notes: $notes, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $PartiesTable extends Parties with TableInfo<$PartiesTable, Party> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $PartiesTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _displayNameMeta = const VerificationMeta( 'displayName', ); @override late final GeneratedColumn displayName = GeneratedColumn( 'display_name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _publicKeyMeta = const VerificationMeta( 'publicKey', ); @override late final GeneratedColumn publicKey = GeneratedColumn( 'public_key', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override late final GeneratedColumnWithTypeConverter kind = GeneratedColumn( 'kind', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: false, defaultValue: const Constant('person'), ).withConverter($PartiesTable.$converterkind); static const VerificationMeta _noteMeta = const VerificationMeta('note'); @override late final GeneratedColumn note = GeneratedColumn( 'note', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, displayName, publicKey, kind, note, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'parties'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('display_name')) { context.handle( _displayNameMeta, displayName.isAcceptableOrUnknown( data['display_name']!, _displayNameMeta, ), ); } else if (isInserting) { context.missing(_displayNameMeta); } if (data.containsKey('public_key')) { context.handle( _publicKeyMeta, publicKey.isAcceptableOrUnknown(data['public_key']!, _publicKeyMeta), ); } if (data.containsKey('note')) { context.handle( _noteMeta, note.isAcceptableOrUnknown(data['note']!, _noteMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Party map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Party( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, displayName: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}display_name'], )!, publicKey: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}public_key'], ), kind: $PartiesTable.$converterkind.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}kind'], )!, ), note: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}note'], ), ); } @override $PartiesTable createAlias(String alias) { return $PartiesTable(attachedDatabase, alias); } static JsonTypeConverter2 $converterkind = const EnumNameConverter(PartyKind.values); } class Party extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final String displayName; final String? publicKey; final PartyKind kind; final String? note; const Party({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.displayName, this.publicKey, required this.kind, this.note, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); map['display_name'] = Variable(displayName); if (!nullToAbsent || publicKey != null) { map['public_key'] = Variable(publicKey); } { map['kind'] = Variable($PartiesTable.$converterkind.toSql(kind)); } if (!nullToAbsent || note != null) { map['note'] = Variable(note); } return map; } PartiesCompanion toCompanion(bool nullToAbsent) { return PartiesCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), displayName: Value(displayName), publicKey: publicKey == null && nullToAbsent ? const Value.absent() : Value(publicKey), kind: Value(kind), note: note == null && nullToAbsent ? const Value.absent() : Value(note), ); } factory Party.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Party( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), displayName: serializer.fromJson(json['displayName']), publicKey: serializer.fromJson(json['publicKey']), kind: $PartiesTable.$converterkind.fromJson( serializer.fromJson(json['kind']), ), note: serializer.fromJson(json['note']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'displayName': serializer.toJson(displayName), 'publicKey': serializer.toJson(publicKey), 'kind': serializer.toJson( $PartiesTable.$converterkind.toJson(kind), ), 'note': serializer.toJson(note), }; } Party copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, String? displayName, Value publicKey = const Value.absent(), PartyKind? kind, Value note = const Value.absent(), }) => Party( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, displayName: displayName ?? this.displayName, publicKey: publicKey.present ? publicKey.value : this.publicKey, kind: kind ?? this.kind, note: note.present ? note.value : this.note, ); Party copyWithCompanion(PartiesCompanion data) { return Party( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, displayName: data.displayName.present ? data.displayName.value : this.displayName, publicKey: data.publicKey.present ? data.publicKey.value : this.publicKey, kind: data.kind.present ? data.kind.value : this.kind, note: data.note.present ? data.note.value : this.note, ); } @override String toString() { return (StringBuffer('Party(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('displayName: $displayName, ') ..write('publicKey: $publicKey, ') ..write('kind: $kind, ') ..write('note: $note') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, displayName, publicKey, kind, note, ); @override bool operator ==(Object other) => identical(this, other) || (other is Party && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.displayName == this.displayName && other.publicKey == this.publicKey && other.kind == this.kind && other.note == this.note); } class PartiesCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value displayName; final Value publicKey; final Value kind; final Value note; final Value rowid; const PartiesCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.displayName = const Value.absent(), this.publicKey = const Value.absent(), this.kind = const Value.absent(), this.note = const Value.absent(), this.rowid = const Value.absent(), }); PartiesCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required String displayName, this.publicKey = const Value.absent(), this.kind = const Value.absent(), this.note = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), displayName = Value(displayName); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? displayName, Expression? publicKey, Expression? kind, Expression? note, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (displayName != null) 'display_name': displayName, if (publicKey != null) 'public_key': publicKey, if (kind != null) 'kind': kind, if (note != null) 'note': note, if (rowid != null) 'rowid': rowid, }); } PartiesCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? displayName, Value? publicKey, Value? kind, Value? note, Value? rowid, }) { return PartiesCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, displayName: displayName ?? this.displayName, publicKey: publicKey ?? this.publicKey, kind: kind ?? this.kind, note: note ?? this.note, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (displayName.present) { map['display_name'] = Variable(displayName.value); } if (publicKey.present) { map['public_key'] = Variable(publicKey.value); } if (kind.present) { map['kind'] = Variable( $PartiesTable.$converterkind.toSql(kind.value), ); } if (note.present) { map['note'] = Variable(note.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('PartiesCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('displayName: $displayName, ') ..write('publicKey: $publicKey, ') ..write('kind: $kind, ') ..write('note: $note, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $AttachmentsTable extends Attachments with TableInfo<$AttachmentsTable, Attachment> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $AttachmentsTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); @override late final GeneratedColumnWithTypeConverter parentType = GeneratedColumn( 'parent_type', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ).withConverter($AttachmentsTable.$converterparentType); static const VerificationMeta _parentIdMeta = const VerificationMeta( 'parentId', ); @override late final GeneratedColumn parentId = GeneratedColumn( 'parent_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); @override late final GeneratedColumnWithTypeConverter kind = GeneratedColumn( 'kind', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ).withConverter($AttachmentsTable.$converterkind); static const VerificationMeta _uriMeta = const VerificationMeta('uri'); @override late final GeneratedColumn uri = GeneratedColumn( 'uri', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _bytesMeta = const VerificationMeta('bytes'); @override late final GeneratedColumn bytes = GeneratedColumn( 'bytes', aliasedName, true, type: DriftSqlType.blob, requiredDuringInsert: false, ); static const VerificationMeta _mimeTypeMeta = const VerificationMeta( 'mimeType', ); @override late final GeneratedColumn mimeType = GeneratedColumn( 'mime_type', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _sortOrderMeta = const VerificationMeta( 'sortOrder', ); @override late final GeneratedColumn sortOrder = GeneratedColumn( 'sort_order', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(0), ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, parentType, parentId, kind, uri, bytes, mimeType, sortOrder, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'attachments'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('parent_id')) { context.handle( _parentIdMeta, parentId.isAcceptableOrUnknown(data['parent_id']!, _parentIdMeta), ); } else if (isInserting) { context.missing(_parentIdMeta); } if (data.containsKey('uri')) { context.handle( _uriMeta, uri.isAcceptableOrUnknown(data['uri']!, _uriMeta), ); } if (data.containsKey('bytes')) { context.handle( _bytesMeta, bytes.isAcceptableOrUnknown(data['bytes']!, _bytesMeta), ); } if (data.containsKey('mime_type')) { context.handle( _mimeTypeMeta, mimeType.isAcceptableOrUnknown(data['mime_type']!, _mimeTypeMeta), ); } if (data.containsKey('sort_order')) { context.handle( _sortOrderMeta, sortOrder.isAcceptableOrUnknown(data['sort_order']!, _sortOrderMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Attachment map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Attachment( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, parentType: $AttachmentsTable.$converterparentType.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}parent_type'], )!, ), parentId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}parent_id'], )!, kind: $AttachmentsTable.$converterkind.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}kind'], )!, ), uri: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}uri'], ), bytes: attachedDatabase.typeMapping.read( DriftSqlType.blob, data['${effectivePrefix}bytes'], ), mimeType: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}mime_type'], ), sortOrder: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}sort_order'], )!, ); } @override $AttachmentsTable createAlias(String alias) { return $AttachmentsTable(attachedDatabase, alias); } static JsonTypeConverter2 $converterparentType = const EnumNameConverter(ParentType.values); static JsonTypeConverter2 $converterkind = const EnumNameConverter(AttachmentKind.values); } class Attachment extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final ParentType parentType; final String parentId; final AttachmentKind kind; final String? uri; final Uint8List? bytes; final String? mimeType; /// Display order among sibling attachments (lower first). The lowest-ordered /// photo is the "preferred"/cover — used as the variety avatar and shown /// first. New photos append at the end; "set as cover" moves one to the /// front. A plain int (not a bool flag) so it generalizes to full reordering. final int sortOrder; const Attachment({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.parentType, required this.parentId, required this.kind, this.uri, this.bytes, this.mimeType, required this.sortOrder, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); { map['parent_type'] = Variable( $AttachmentsTable.$converterparentType.toSql(parentType), ); } map['parent_id'] = Variable(parentId); { map['kind'] = Variable( $AttachmentsTable.$converterkind.toSql(kind), ); } if (!nullToAbsent || uri != null) { map['uri'] = Variable(uri); } if (!nullToAbsent || bytes != null) { map['bytes'] = Variable(bytes); } if (!nullToAbsent || mimeType != null) { map['mime_type'] = Variable(mimeType); } map['sort_order'] = Variable(sortOrder); return map; } AttachmentsCompanion toCompanion(bool nullToAbsent) { return AttachmentsCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), parentType: Value(parentType), parentId: Value(parentId), kind: Value(kind), uri: uri == null && nullToAbsent ? const Value.absent() : Value(uri), bytes: bytes == null && nullToAbsent ? const Value.absent() : Value(bytes), mimeType: mimeType == null && nullToAbsent ? const Value.absent() : Value(mimeType), sortOrder: Value(sortOrder), ); } factory Attachment.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Attachment( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), parentType: $AttachmentsTable.$converterparentType.fromJson( serializer.fromJson(json['parentType']), ), parentId: serializer.fromJson(json['parentId']), kind: $AttachmentsTable.$converterkind.fromJson( serializer.fromJson(json['kind']), ), uri: serializer.fromJson(json['uri']), bytes: serializer.fromJson(json['bytes']), mimeType: serializer.fromJson(json['mimeType']), sortOrder: serializer.fromJson(json['sortOrder']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'parentType': serializer.toJson( $AttachmentsTable.$converterparentType.toJson(parentType), ), 'parentId': serializer.toJson(parentId), 'kind': serializer.toJson( $AttachmentsTable.$converterkind.toJson(kind), ), 'uri': serializer.toJson(uri), 'bytes': serializer.toJson(bytes), 'mimeType': serializer.toJson(mimeType), 'sortOrder': serializer.toJson(sortOrder), }; } Attachment copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, ParentType? parentType, String? parentId, AttachmentKind? kind, Value uri = const Value.absent(), Value bytes = const Value.absent(), Value mimeType = const Value.absent(), int? sortOrder, }) => Attachment( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, parentType: parentType ?? this.parentType, parentId: parentId ?? this.parentId, kind: kind ?? this.kind, uri: uri.present ? uri.value : this.uri, bytes: bytes.present ? bytes.value : this.bytes, mimeType: mimeType.present ? mimeType.value : this.mimeType, sortOrder: sortOrder ?? this.sortOrder, ); Attachment copyWithCompanion(AttachmentsCompanion data) { return Attachment( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, parentType: data.parentType.present ? data.parentType.value : this.parentType, parentId: data.parentId.present ? data.parentId.value : this.parentId, kind: data.kind.present ? data.kind.value : this.kind, uri: data.uri.present ? data.uri.value : this.uri, bytes: data.bytes.present ? data.bytes.value : this.bytes, mimeType: data.mimeType.present ? data.mimeType.value : this.mimeType, sortOrder: data.sortOrder.present ? data.sortOrder.value : this.sortOrder, ); } @override String toString() { return (StringBuffer('Attachment(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('parentType: $parentType, ') ..write('parentId: $parentId, ') ..write('kind: $kind, ') ..write('uri: $uri, ') ..write('bytes: $bytes, ') ..write('mimeType: $mimeType, ') ..write('sortOrder: $sortOrder') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, parentType, parentId, kind, uri, $driftBlobEquality.hash(bytes), mimeType, sortOrder, ); @override bool operator ==(Object other) => identical(this, other) || (other is Attachment && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.parentType == this.parentType && other.parentId == this.parentId && other.kind == this.kind && other.uri == this.uri && $driftBlobEquality.equals(other.bytes, this.bytes) && other.mimeType == this.mimeType && other.sortOrder == this.sortOrder); } class AttachmentsCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value parentType; final Value parentId; final Value kind; final Value uri; final Value bytes; final Value mimeType; final Value sortOrder; final Value rowid; const AttachmentsCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.parentType = const Value.absent(), this.parentId = const Value.absent(), this.kind = const Value.absent(), this.uri = const Value.absent(), this.bytes = const Value.absent(), this.mimeType = const Value.absent(), this.sortOrder = const Value.absent(), this.rowid = const Value.absent(), }); AttachmentsCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required ParentType parentType, required String parentId, required AttachmentKind kind, this.uri = const Value.absent(), this.bytes = const Value.absent(), this.mimeType = const Value.absent(), this.sortOrder = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), parentType = Value(parentType), parentId = Value(parentId), kind = Value(kind); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? parentType, Expression? parentId, Expression? kind, Expression? uri, Expression? bytes, Expression? mimeType, Expression? sortOrder, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (parentType != null) 'parent_type': parentType, if (parentId != null) 'parent_id': parentId, if (kind != null) 'kind': kind, if (uri != null) 'uri': uri, if (bytes != null) 'bytes': bytes, if (mimeType != null) 'mime_type': mimeType, if (sortOrder != null) 'sort_order': sortOrder, if (rowid != null) 'rowid': rowid, }); } AttachmentsCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? parentType, Value? parentId, Value? kind, Value? uri, Value? bytes, Value? mimeType, Value? sortOrder, Value? rowid, }) { return AttachmentsCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, parentType: parentType ?? this.parentType, parentId: parentId ?? this.parentId, kind: kind ?? this.kind, uri: uri ?? this.uri, bytes: bytes ?? this.bytes, mimeType: mimeType ?? this.mimeType, sortOrder: sortOrder ?? this.sortOrder, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (parentType.present) { map['parent_type'] = Variable( $AttachmentsTable.$converterparentType.toSql(parentType.value), ); } if (parentId.present) { map['parent_id'] = Variable(parentId.value); } if (kind.present) { map['kind'] = Variable( $AttachmentsTable.$converterkind.toSql(kind.value), ); } if (uri.present) { map['uri'] = Variable(uri.value); } if (bytes.present) { map['bytes'] = Variable(bytes.value); } if (mimeType.present) { map['mime_type'] = Variable(mimeType.value); } if (sortOrder.present) { map['sort_order'] = Variable(sortOrder.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('AttachmentsCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('parentType: $parentType, ') ..write('parentId: $parentId, ') ..write('kind: $kind, ') ..write('uri: $uri, ') ..write('bytes: $bytes, ') ..write('mimeType: $mimeType, ') ..write('sortOrder: $sortOrder, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $ExternalLinksTable extends ExternalLinks with TableInfo<$ExternalLinksTable, ExternalLink> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $ExternalLinksTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); @override late final GeneratedColumnWithTypeConverter parentType = GeneratedColumn( 'parent_type', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ).withConverter($ExternalLinksTable.$converterparentType); static const VerificationMeta _parentIdMeta = const VerificationMeta( 'parentId', ); @override late final GeneratedColumn parentId = GeneratedColumn( 'parent_id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _urlMeta = const VerificationMeta('url'); @override late final GeneratedColumn url = GeneratedColumn( 'url', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _titleMeta = const VerificationMeta('title'); @override late final GeneratedColumn title = GeneratedColumn( 'title', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, parentType, parentId, url, title, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'external_links'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('parent_id')) { context.handle( _parentIdMeta, parentId.isAcceptableOrUnknown(data['parent_id']!, _parentIdMeta), ); } else if (isInserting) { context.missing(_parentIdMeta); } if (data.containsKey('url')) { context.handle( _urlMeta, url.isAcceptableOrUnknown(data['url']!, _urlMeta), ); } else if (isInserting) { context.missing(_urlMeta); } if (data.containsKey('title')) { context.handle( _titleMeta, title.isAcceptableOrUnknown(data['title']!, _titleMeta), ); } return context; } @override Set get $primaryKey => {id}; @override ExternalLink map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return ExternalLink( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, parentType: $ExternalLinksTable.$converterparentType.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}parent_type'], )!, ), parentId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}parent_id'], )!, url: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}url'], )!, title: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}title'], ), ); } @override $ExternalLinksTable createAlias(String alias) { return $ExternalLinksTable(attachedDatabase, alias); } static JsonTypeConverter2 $converterparentType = const EnumNameConverter(ParentType.values); } class ExternalLink extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; final ParentType parentType; final String parentId; final String url; final String? title; const ExternalLink({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, required this.parentType, required this.parentId, required this.url, this.title, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); { map['parent_type'] = Variable( $ExternalLinksTable.$converterparentType.toSql(parentType), ); } map['parent_id'] = Variable(parentId); map['url'] = Variable(url); if (!nullToAbsent || title != null) { map['title'] = Variable(title); } return map; } ExternalLinksCompanion toCompanion(bool nullToAbsent) { return ExternalLinksCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), parentType: Value(parentType), parentId: Value(parentId), url: Value(url), title: title == null && nullToAbsent ? const Value.absent() : Value(title), ); } factory ExternalLink.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return ExternalLink( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), parentType: $ExternalLinksTable.$converterparentType.fromJson( serializer.fromJson(json['parentType']), ), parentId: serializer.fromJson(json['parentId']), url: serializer.fromJson(json['url']), title: serializer.fromJson(json['title']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'parentType': serializer.toJson( $ExternalLinksTable.$converterparentType.toJson(parentType), ), 'parentId': serializer.toJson(parentId), 'url': serializer.toJson(url), 'title': serializer.toJson(title), }; } ExternalLink copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, ParentType? parentType, String? parentId, String? url, Value title = const Value.absent(), }) => ExternalLink( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, parentType: parentType ?? this.parentType, parentId: parentId ?? this.parentId, url: url ?? this.url, title: title.present ? title.value : this.title, ); ExternalLink copyWithCompanion(ExternalLinksCompanion data) { return ExternalLink( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, parentType: data.parentType.present ? data.parentType.value : this.parentType, parentId: data.parentId.present ? data.parentId.value : this.parentId, url: data.url.present ? data.url.value : this.url, title: data.title.present ? data.title.value : this.title, ); } @override String toString() { return (StringBuffer('ExternalLink(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('parentType: $parentType, ') ..write('parentId: $parentId, ') ..write('url: $url, ') ..write('title: $title') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, parentType, parentId, url, title, ); @override bool operator ==(Object other) => identical(this, other) || (other is ExternalLink && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.parentType == this.parentType && other.parentId == this.parentId && other.url == this.url && other.title == this.title); } class ExternalLinksCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value parentType; final Value parentId; final Value url; final Value title; final Value rowid; const ExternalLinksCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.parentType = const Value.absent(), this.parentId = const Value.absent(), this.url = const Value.absent(), this.title = const Value.absent(), this.rowid = const Value.absent(), }); ExternalLinksCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), required ParentType parentType, required String parentId, required String url, this.title = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), parentType = Value(parentType), parentId = Value(parentId), url = Value(url); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? parentType, Expression? parentId, Expression? url, Expression? title, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (parentType != null) 'parent_type': parentType, if (parentId != null) 'parent_id': parentId, if (url != null) 'url': url, if (title != null) 'title': title, if (rowid != null) 'rowid': rowid, }); } ExternalLinksCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? parentType, Value? parentId, Value? url, Value? title, Value? rowid, }) { return ExternalLinksCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, parentType: parentType ?? this.parentType, parentId: parentId ?? this.parentId, url: url ?? this.url, title: title ?? this.title, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (parentType.present) { map['parent_type'] = Variable( $ExternalLinksTable.$converterparentType.toSql(parentType.value), ); } if (parentId.present) { map['parent_id'] = Variable(parentId.value); } if (url.present) { map['url'] = Variable(url.value); } if (title.present) { map['title'] = Variable(title.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('ExternalLinksCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('parentType: $parentType, ') ..write('parentId: $parentId, ') ..write('url: $url, ') ..write('title: $title, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $PlantaresTable extends Plantares with TableInfo<$PlantaresTable, Plantare> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $PlantaresTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _varietyIdMeta = const VerificationMeta( 'varietyId', ); @override late final GeneratedColumn varietyId = GeneratedColumn( 'variety_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override late final GeneratedColumnWithTypeConverter direction = GeneratedColumn( 'direction', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ).withConverter($PlantaresTable.$converterdirection); static const VerificationMeta _counterpartyMeta = const VerificationMeta( 'counterparty', ); @override late final GeneratedColumn counterparty = GeneratedColumn( 'counterparty', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _owedDescriptionMeta = const VerificationMeta( 'owedDescription', ); @override late final GeneratedColumn owedDescription = GeneratedColumn( 'owed_description', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _madeOnMeta = const VerificationMeta('madeOn'); @override late final GeneratedColumn madeOn = GeneratedColumn( 'made_on', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _dueByMeta = const VerificationMeta('dueBy'); @override late final GeneratedColumn dueBy = GeneratedColumn( 'due_by', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); @override late final GeneratedColumnWithTypeConverter status = GeneratedColumn( 'status', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: false, defaultValue: const Constant('open'), ).withConverter($PlantaresTable.$converterstatus); static const VerificationMeta _settledOnMeta = const VerificationMeta( 'settledOn', ); @override late final GeneratedColumn settledOn = GeneratedColumn( 'settled_on', aliasedName, true, type: DriftSqlType.int, requiredDuringInsert: false, ); static const VerificationMeta _noteMeta = const VerificationMeta('note'); @override late final GeneratedColumn note = GeneratedColumn( 'note', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, varietyId, direction, counterparty, owedDescription, madeOn, dueBy, status, settledOn, note, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'plantares'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('variety_id')) { context.handle( _varietyIdMeta, varietyId.isAcceptableOrUnknown(data['variety_id']!, _varietyIdMeta), ); } if (data.containsKey('counterparty')) { context.handle( _counterpartyMeta, counterparty.isAcceptableOrUnknown( data['counterparty']!, _counterpartyMeta, ), ); } if (data.containsKey('owed_description')) { context.handle( _owedDescriptionMeta, owedDescription.isAcceptableOrUnknown( data['owed_description']!, _owedDescriptionMeta, ), ); } if (data.containsKey('made_on')) { context.handle( _madeOnMeta, madeOn.isAcceptableOrUnknown(data['made_on']!, _madeOnMeta), ); } else if (isInserting) { context.missing(_madeOnMeta); } if (data.containsKey('due_by')) { context.handle( _dueByMeta, dueBy.isAcceptableOrUnknown(data['due_by']!, _dueByMeta), ); } if (data.containsKey('settled_on')) { context.handle( _settledOnMeta, settledOn.isAcceptableOrUnknown(data['settled_on']!, _settledOnMeta), ); } if (data.containsKey('note')) { context.handle( _noteMeta, note.isAcceptableOrUnknown(data['note']!, _noteMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Plantare map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Plantare( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, varietyId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}variety_id'], ), direction: $PlantaresTable.$converterdirection.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}direction'], )!, ), counterparty: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}counterparty'], ), owedDescription: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}owed_description'], ), madeOn: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}made_on'], )!, dueBy: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}due_by'], ), status: $PlantaresTable.$converterstatus.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}status'], )!, ), settledOn: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}settled_on'], ), note: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}note'], ), ); } @override $PlantaresTable createAlias(String alias) { return $PlantaresTable(attachedDatabase, alias); } static JsonTypeConverter2 $converterdirection = const EnumNameConverter( PlantareDirection.values, ); static JsonTypeConverter2 $converterstatus = const EnumNameConverter(PlantareStatus.values); } class Plantare extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; /// The seed the commitment is about — what gets reproduced. Nullable so a /// commitment can be jotted before it's linked to a catalogued variety. final String? varietyId; /// Whose promise it is (I return / owed to me). final PlantareDirection direction; /// The other party as a human name (v1). A key/Party link arrives with the /// signed cross-party form. final String? counterparty; /// What's promised back, in the grower's own words /// ("un puñado la próxima temporada"). final String? owedDescription; /// When the promise was made (ms since epoch). final int madeOn; /// Optional return-by date (ms since epoch) — a gentle reminder, not a deadline. final int? dueBy; final PlantareStatus status; /// When it was returned or forgiven (ms since epoch). final int? settledOn; final String? note; const Plantare({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, this.varietyId, required this.direction, this.counterparty, this.owedDescription, required this.madeOn, this.dueBy, required this.status, this.settledOn, this.note, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); if (!nullToAbsent || varietyId != null) { map['variety_id'] = Variable(varietyId); } { map['direction'] = Variable( $PlantaresTable.$converterdirection.toSql(direction), ); } if (!nullToAbsent || counterparty != null) { map['counterparty'] = Variable(counterparty); } if (!nullToAbsent || owedDescription != null) { map['owed_description'] = Variable(owedDescription); } map['made_on'] = Variable(madeOn); if (!nullToAbsent || dueBy != null) { map['due_by'] = Variable(dueBy); } { map['status'] = Variable( $PlantaresTable.$converterstatus.toSql(status), ); } if (!nullToAbsent || settledOn != null) { map['settled_on'] = Variable(settledOn); } if (!nullToAbsent || note != null) { map['note'] = Variable(note); } return map; } PlantaresCompanion toCompanion(bool nullToAbsent) { return PlantaresCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), varietyId: varietyId == null && nullToAbsent ? const Value.absent() : Value(varietyId), direction: Value(direction), counterparty: counterparty == null && nullToAbsent ? const Value.absent() : Value(counterparty), owedDescription: owedDescription == null && nullToAbsent ? const Value.absent() : Value(owedDescription), madeOn: Value(madeOn), dueBy: dueBy == null && nullToAbsent ? const Value.absent() : Value(dueBy), status: Value(status), settledOn: settledOn == null && nullToAbsent ? const Value.absent() : Value(settledOn), note: note == null && nullToAbsent ? const Value.absent() : Value(note), ); } factory Plantare.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Plantare( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), varietyId: serializer.fromJson(json['varietyId']), direction: $PlantaresTable.$converterdirection.fromJson( serializer.fromJson(json['direction']), ), counterparty: serializer.fromJson(json['counterparty']), owedDescription: serializer.fromJson(json['owedDescription']), madeOn: serializer.fromJson(json['madeOn']), dueBy: serializer.fromJson(json['dueBy']), status: $PlantaresTable.$converterstatus.fromJson( serializer.fromJson(json['status']), ), settledOn: serializer.fromJson(json['settledOn']), note: serializer.fromJson(json['note']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'varietyId': serializer.toJson(varietyId), 'direction': serializer.toJson( $PlantaresTable.$converterdirection.toJson(direction), ), 'counterparty': serializer.toJson(counterparty), 'owedDescription': serializer.toJson(owedDescription), 'madeOn': serializer.toJson(madeOn), 'dueBy': serializer.toJson(dueBy), 'status': serializer.toJson( $PlantaresTable.$converterstatus.toJson(status), ), 'settledOn': serializer.toJson(settledOn), 'note': serializer.toJson(note), }; } Plantare copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, Value varietyId = const Value.absent(), PlantareDirection? direction, Value counterparty = const Value.absent(), Value owedDescription = const Value.absent(), int? madeOn, Value dueBy = const Value.absent(), PlantareStatus? status, Value settledOn = const Value.absent(), Value note = const Value.absent(), }) => Plantare( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, varietyId: varietyId.present ? varietyId.value : this.varietyId, direction: direction ?? this.direction, counterparty: counterparty.present ? counterparty.value : this.counterparty, owedDescription: owedDescription.present ? owedDescription.value : this.owedDescription, madeOn: madeOn ?? this.madeOn, dueBy: dueBy.present ? dueBy.value : this.dueBy, status: status ?? this.status, settledOn: settledOn.present ? settledOn.value : this.settledOn, note: note.present ? note.value : this.note, ); Plantare copyWithCompanion(PlantaresCompanion data) { return Plantare( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, varietyId: data.varietyId.present ? data.varietyId.value : this.varietyId, direction: data.direction.present ? data.direction.value : this.direction, counterparty: data.counterparty.present ? data.counterparty.value : this.counterparty, owedDescription: data.owedDescription.present ? data.owedDescription.value : this.owedDescription, madeOn: data.madeOn.present ? data.madeOn.value : this.madeOn, dueBy: data.dueBy.present ? data.dueBy.value : this.dueBy, status: data.status.present ? data.status.value : this.status, settledOn: data.settledOn.present ? data.settledOn.value : this.settledOn, note: data.note.present ? data.note.value : this.note, ); } @override String toString() { return (StringBuffer('Plantare(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('varietyId: $varietyId, ') ..write('direction: $direction, ') ..write('counterparty: $counterparty, ') ..write('owedDescription: $owedDescription, ') ..write('madeOn: $madeOn, ') ..write('dueBy: $dueBy, ') ..write('status: $status, ') ..write('settledOn: $settledOn, ') ..write('note: $note') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, varietyId, direction, counterparty, owedDescription, madeOn, dueBy, status, settledOn, note, ); @override bool operator ==(Object other) => identical(this, other) || (other is Plantare && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.varietyId == this.varietyId && other.direction == this.direction && other.counterparty == this.counterparty && other.owedDescription == this.owedDescription && other.madeOn == this.madeOn && other.dueBy == this.dueBy && other.status == this.status && other.settledOn == this.settledOn && other.note == this.note); } class PlantaresCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value varietyId; final Value direction; final Value counterparty; final Value owedDescription; final Value madeOn; final Value dueBy; final Value status; final Value settledOn; final Value note; final Value rowid; const PlantaresCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.varietyId = const Value.absent(), this.direction = const Value.absent(), this.counterparty = const Value.absent(), this.owedDescription = const Value.absent(), this.madeOn = const Value.absent(), this.dueBy = const Value.absent(), this.status = const Value.absent(), this.settledOn = const Value.absent(), this.note = const Value.absent(), this.rowid = const Value.absent(), }); PlantaresCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.varietyId = const Value.absent(), required PlantareDirection direction, this.counterparty = const Value.absent(), this.owedDescription = const Value.absent(), required int madeOn, this.dueBy = const Value.absent(), this.status = const Value.absent(), this.settledOn = const Value.absent(), this.note = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), direction = Value(direction), madeOn = Value(madeOn); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? varietyId, Expression? direction, Expression? counterparty, Expression? owedDescription, Expression? madeOn, Expression? dueBy, Expression? status, Expression? settledOn, Expression? note, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (varietyId != null) 'variety_id': varietyId, if (direction != null) 'direction': direction, if (counterparty != null) 'counterparty': counterparty, if (owedDescription != null) 'owed_description': owedDescription, if (madeOn != null) 'made_on': madeOn, if (dueBy != null) 'due_by': dueBy, if (status != null) 'status': status, if (settledOn != null) 'settled_on': settledOn, if (note != null) 'note': note, if (rowid != null) 'rowid': rowid, }); } PlantaresCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? varietyId, Value? direction, Value? counterparty, Value? owedDescription, Value? madeOn, Value? dueBy, Value? status, Value? settledOn, Value? note, Value? rowid, }) { return PlantaresCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, varietyId: varietyId ?? this.varietyId, direction: direction ?? this.direction, counterparty: counterparty ?? this.counterparty, owedDescription: owedDescription ?? this.owedDescription, madeOn: madeOn ?? this.madeOn, dueBy: dueBy ?? this.dueBy, status: status ?? this.status, settledOn: settledOn ?? this.settledOn, note: note ?? this.note, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (varietyId.present) { map['variety_id'] = Variable(varietyId.value); } if (direction.present) { map['direction'] = Variable( $PlantaresTable.$converterdirection.toSql(direction.value), ); } if (counterparty.present) { map['counterparty'] = Variable(counterparty.value); } if (owedDescription.present) { map['owed_description'] = Variable(owedDescription.value); } if (madeOn.present) { map['made_on'] = Variable(madeOn.value); } if (dueBy.present) { map['due_by'] = Variable(dueBy.value); } if (status.present) { map['status'] = Variable( $PlantaresTable.$converterstatus.toSql(status.value), ); } if (settledOn.present) { map['settled_on'] = Variable(settledOn.value); } if (note.present) { map['note'] = Variable(note.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('PlantaresCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('varietyId: $varietyId, ') ..write('direction: $direction, ') ..write('counterparty: $counterparty, ') ..write('owedDescription: $owedDescription, ') ..write('madeOn: $madeOn, ') ..write('dueBy: $dueBy, ') ..write('status: $status, ') ..write('settledOn: $settledOn, ') ..write('note: $note, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $SalesTable extends Sales with TableInfo<$SalesTable, Sale> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $SalesTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _lastAuthorMeta = const VerificationMeta( 'lastAuthor', ); @override late final GeneratedColumn lastAuthor = GeneratedColumn( 'last_author', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isDeletedMeta = const VerificationMeta( 'isDeleted', ); @override late final GeneratedColumn isDeleted = GeneratedColumn( 'is_deleted', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_deleted" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _schemaRowVersionMeta = const VerificationMeta( 'schemaRowVersion', ); @override late final GeneratedColumn schemaRowVersion = GeneratedColumn( 'schema_row_version', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _varietyIdMeta = const VerificationMeta( 'varietyId', ); @override late final GeneratedColumn varietyId = GeneratedColumn( 'variety_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override late final GeneratedColumnWithTypeConverter direction = GeneratedColumn( 'direction', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ).withConverter($SalesTable.$converterdirection); static const VerificationMeta _counterpartyMeta = const VerificationMeta( 'counterparty', ); @override late final GeneratedColumn counterparty = GeneratedColumn( 'counterparty', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _amountMeta = const VerificationMeta('amount'); @override late final GeneratedColumn amount = GeneratedColumn( 'amount', aliasedName, true, type: DriftSqlType.double, requiredDuringInsert: false, ); static const VerificationMeta _currencyMeta = const VerificationMeta( 'currency', ); @override late final GeneratedColumn currency = GeneratedColumn( 'currency', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _soldOnMeta = const VerificationMeta('soldOn'); @override late final GeneratedColumn soldOn = GeneratedColumn( 'sold_on', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _noteMeta = const VerificationMeta('note'); @override late final GeneratedColumn note = GeneratedColumn( 'note', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); @override List get $columns => [ id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, varietyId, direction, counterparty, amount, currency, soldOn, note, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'sales'; @override VerificationContext validateIntegrity( Insertable instance, { bool isInserting = false, }) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('id')) { context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta)); } else if (isInserting) { context.missing(_idMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } else if (isInserting) { context.missing(_createdAtMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } else if (isInserting) { context.missing(_updatedAtMeta); } if (data.containsKey('last_author')) { context.handle( _lastAuthorMeta, lastAuthor.isAcceptableOrUnknown(data['last_author']!, _lastAuthorMeta), ); } else if (isInserting) { context.missing(_lastAuthorMeta); } if (data.containsKey('is_deleted')) { context.handle( _isDeletedMeta, isDeleted.isAcceptableOrUnknown(data['is_deleted']!, _isDeletedMeta), ); } if (data.containsKey('schema_row_version')) { context.handle( _schemaRowVersionMeta, schemaRowVersion.isAcceptableOrUnknown( data['schema_row_version']!, _schemaRowVersionMeta, ), ); } if (data.containsKey('variety_id')) { context.handle( _varietyIdMeta, varietyId.isAcceptableOrUnknown(data['variety_id']!, _varietyIdMeta), ); } if (data.containsKey('counterparty')) { context.handle( _counterpartyMeta, counterparty.isAcceptableOrUnknown( data['counterparty']!, _counterpartyMeta, ), ); } if (data.containsKey('amount')) { context.handle( _amountMeta, amount.isAcceptableOrUnknown(data['amount']!, _amountMeta), ); } if (data.containsKey('currency')) { context.handle( _currencyMeta, currency.isAcceptableOrUnknown(data['currency']!, _currencyMeta), ); } if (data.containsKey('sold_on')) { context.handle( _soldOnMeta, soldOn.isAcceptableOrUnknown(data['sold_on']!, _soldOnMeta), ); } else if (isInserting) { context.missing(_soldOnMeta); } if (data.containsKey('note')) { context.handle( _noteMeta, note.isAcceptableOrUnknown(data['note']!, _noteMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Sale map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Sale( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}created_at'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}updated_at'], )!, lastAuthor: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}last_author'], )!, isDeleted: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_deleted'], )!, schemaRowVersion: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}schema_row_version'], )!, varietyId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}variety_id'], ), direction: $SalesTable.$converterdirection.fromSql( attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}direction'], )!, ), counterparty: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}counterparty'], ), amount: attachedDatabase.typeMapping.read( DriftSqlType.double, data['${effectivePrefix}amount'], ), currency: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}currency'], ), soldOn: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}sold_on'], )!, note: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}note'], ), ); } @override $SalesTable createAlias(String alias) { return $SalesTable(attachedDatabase, alias); } static JsonTypeConverter2 $converterdirection = const EnumNameConverter(SaleDirection.values); } class Sale extends DataClass implements Insertable { final String id; final int createdAt; final String updatedAt; final String lastAuthor; final bool isDeleted; final int schemaRowVersion; /// The seed sold/bought. Nullable so a sale can be jotted before it's linked /// to a catalogued variety. final String? varietyId; /// Whether I sold or I bought. final SaleDirection direction; /// The other party as a human name (v1). final String? counterparty; /// Price paid. Nullable — a barter-ish "sale" recorded before a figure is set. final double? amount; /// The currency, free text: "€", "Ğ1", "horas", a local currency name. Never /// assumed — the seed world uses many (sharing-model §6). final String? currency; /// When the sale happened (ms since epoch). final int soldOn; final String? note; const Sale({ required this.id, required this.createdAt, required this.updatedAt, required this.lastAuthor, required this.isDeleted, required this.schemaRowVersion, this.varietyId, required this.direction, this.counterparty, this.amount, this.currency, required this.soldOn, this.note, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['created_at'] = Variable(createdAt); map['updated_at'] = Variable(updatedAt); map['last_author'] = Variable(lastAuthor); map['is_deleted'] = Variable(isDeleted); map['schema_row_version'] = Variable(schemaRowVersion); if (!nullToAbsent || varietyId != null) { map['variety_id'] = Variable(varietyId); } { map['direction'] = Variable( $SalesTable.$converterdirection.toSql(direction), ); } if (!nullToAbsent || counterparty != null) { map['counterparty'] = Variable(counterparty); } if (!nullToAbsent || amount != null) { map['amount'] = Variable(amount); } if (!nullToAbsent || currency != null) { map['currency'] = Variable(currency); } map['sold_on'] = Variable(soldOn); if (!nullToAbsent || note != null) { map['note'] = Variable(note); } return map; } SalesCompanion toCompanion(bool nullToAbsent) { return SalesCompanion( id: Value(id), createdAt: Value(createdAt), updatedAt: Value(updatedAt), lastAuthor: Value(lastAuthor), isDeleted: Value(isDeleted), schemaRowVersion: Value(schemaRowVersion), varietyId: varietyId == null && nullToAbsent ? const Value.absent() : Value(varietyId), direction: Value(direction), counterparty: counterparty == null && nullToAbsent ? const Value.absent() : Value(counterparty), amount: amount == null && nullToAbsent ? const Value.absent() : Value(amount), currency: currency == null && nullToAbsent ? const Value.absent() : Value(currency), soldOn: Value(soldOn), note: note == null && nullToAbsent ? const Value.absent() : Value(note), ); } factory Sale.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Sale( id: serializer.fromJson(json['id']), createdAt: serializer.fromJson(json['createdAt']), updatedAt: serializer.fromJson(json['updatedAt']), lastAuthor: serializer.fromJson(json['lastAuthor']), isDeleted: serializer.fromJson(json['isDeleted']), schemaRowVersion: serializer.fromJson(json['schemaRowVersion']), varietyId: serializer.fromJson(json['varietyId']), direction: $SalesTable.$converterdirection.fromJson( serializer.fromJson(json['direction']), ), counterparty: serializer.fromJson(json['counterparty']), amount: serializer.fromJson(json['amount']), currency: serializer.fromJson(json['currency']), soldOn: serializer.fromJson(json['soldOn']), note: serializer.fromJson(json['note']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'createdAt': serializer.toJson(createdAt), 'updatedAt': serializer.toJson(updatedAt), 'lastAuthor': serializer.toJson(lastAuthor), 'isDeleted': serializer.toJson(isDeleted), 'schemaRowVersion': serializer.toJson(schemaRowVersion), 'varietyId': serializer.toJson(varietyId), 'direction': serializer.toJson( $SalesTable.$converterdirection.toJson(direction), ), 'counterparty': serializer.toJson(counterparty), 'amount': serializer.toJson(amount), 'currency': serializer.toJson(currency), 'soldOn': serializer.toJson(soldOn), 'note': serializer.toJson(note), }; } Sale copyWith({ String? id, int? createdAt, String? updatedAt, String? lastAuthor, bool? isDeleted, int? schemaRowVersion, Value varietyId = const Value.absent(), SaleDirection? direction, Value counterparty = const Value.absent(), Value amount = const Value.absent(), Value currency = const Value.absent(), int? soldOn, Value note = const Value.absent(), }) => Sale( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, varietyId: varietyId.present ? varietyId.value : this.varietyId, direction: direction ?? this.direction, counterparty: counterparty.present ? counterparty.value : this.counterparty, amount: amount.present ? amount.value : this.amount, currency: currency.present ? currency.value : this.currency, soldOn: soldOn ?? this.soldOn, note: note.present ? note.value : this.note, ); Sale copyWithCompanion(SalesCompanion data) { return Sale( id: data.id.present ? data.id.value : this.id, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, lastAuthor: data.lastAuthor.present ? data.lastAuthor.value : this.lastAuthor, isDeleted: data.isDeleted.present ? data.isDeleted.value : this.isDeleted, schemaRowVersion: data.schemaRowVersion.present ? data.schemaRowVersion.value : this.schemaRowVersion, varietyId: data.varietyId.present ? data.varietyId.value : this.varietyId, direction: data.direction.present ? data.direction.value : this.direction, counterparty: data.counterparty.present ? data.counterparty.value : this.counterparty, amount: data.amount.present ? data.amount.value : this.amount, currency: data.currency.present ? data.currency.value : this.currency, soldOn: data.soldOn.present ? data.soldOn.value : this.soldOn, note: data.note.present ? data.note.value : this.note, ); } @override String toString() { return (StringBuffer('Sale(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('varietyId: $varietyId, ') ..write('direction: $direction, ') ..write('counterparty: $counterparty, ') ..write('amount: $amount, ') ..write('currency: $currency, ') ..write('soldOn: $soldOn, ') ..write('note: $note') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, createdAt, updatedAt, lastAuthor, isDeleted, schemaRowVersion, varietyId, direction, counterparty, amount, currency, soldOn, note, ); @override bool operator ==(Object other) => identical(this, other) || (other is Sale && other.id == this.id && other.createdAt == this.createdAt && other.updatedAt == this.updatedAt && other.lastAuthor == this.lastAuthor && other.isDeleted == this.isDeleted && other.schemaRowVersion == this.schemaRowVersion && other.varietyId == this.varietyId && other.direction == this.direction && other.counterparty == this.counterparty && other.amount == this.amount && other.currency == this.currency && other.soldOn == this.soldOn && other.note == this.note); } class SalesCompanion extends UpdateCompanion { final Value id; final Value createdAt; final Value updatedAt; final Value lastAuthor; final Value isDeleted; final Value schemaRowVersion; final Value varietyId; final Value direction; final Value counterparty; final Value amount; final Value currency; final Value soldOn; final Value note; final Value rowid; const SalesCompanion({ this.id = const Value.absent(), this.createdAt = const Value.absent(), this.updatedAt = const Value.absent(), this.lastAuthor = const Value.absent(), this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.varietyId = const Value.absent(), this.direction = const Value.absent(), this.counterparty = const Value.absent(), this.amount = const Value.absent(), this.currency = const Value.absent(), this.soldOn = const Value.absent(), this.note = const Value.absent(), this.rowid = const Value.absent(), }); SalesCompanion.insert({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, this.isDeleted = const Value.absent(), this.schemaRowVersion = const Value.absent(), this.varietyId = const Value.absent(), required SaleDirection direction, this.counterparty = const Value.absent(), this.amount = const Value.absent(), this.currency = const Value.absent(), required int soldOn, this.note = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), createdAt = Value(createdAt), updatedAt = Value(updatedAt), lastAuthor = Value(lastAuthor), direction = Value(direction), soldOn = Value(soldOn); static Insertable custom({ Expression? id, Expression? createdAt, Expression? updatedAt, Expression? lastAuthor, Expression? isDeleted, Expression? schemaRowVersion, Expression? varietyId, Expression? direction, Expression? counterparty, Expression? amount, Expression? currency, Expression? soldOn, Expression? note, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (createdAt != null) 'created_at': createdAt, if (updatedAt != null) 'updated_at': updatedAt, if (lastAuthor != null) 'last_author': lastAuthor, if (isDeleted != null) 'is_deleted': isDeleted, if (schemaRowVersion != null) 'schema_row_version': schemaRowVersion, if (varietyId != null) 'variety_id': varietyId, if (direction != null) 'direction': direction, if (counterparty != null) 'counterparty': counterparty, if (amount != null) 'amount': amount, if (currency != null) 'currency': currency, if (soldOn != null) 'sold_on': soldOn, if (note != null) 'note': note, if (rowid != null) 'rowid': rowid, }); } SalesCompanion copyWith({ Value? id, Value? createdAt, Value? updatedAt, Value? lastAuthor, Value? isDeleted, Value? schemaRowVersion, Value? varietyId, Value? direction, Value? counterparty, Value? amount, Value? currency, Value? soldOn, Value? note, Value? rowid, }) { return SalesCompanion( id: id ?? this.id, createdAt: createdAt ?? this.createdAt, updatedAt: updatedAt ?? this.updatedAt, lastAuthor: lastAuthor ?? this.lastAuthor, isDeleted: isDeleted ?? this.isDeleted, schemaRowVersion: schemaRowVersion ?? this.schemaRowVersion, varietyId: varietyId ?? this.varietyId, direction: direction ?? this.direction, counterparty: counterparty ?? this.counterparty, amount: amount ?? this.amount, currency: currency ?? this.currency, soldOn: soldOn ?? this.soldOn, note: note ?? this.note, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } if (lastAuthor.present) { map['last_author'] = Variable(lastAuthor.value); } if (isDeleted.present) { map['is_deleted'] = Variable(isDeleted.value); } if (schemaRowVersion.present) { map['schema_row_version'] = Variable(schemaRowVersion.value); } if (varietyId.present) { map['variety_id'] = Variable(varietyId.value); } if (direction.present) { map['direction'] = Variable( $SalesTable.$converterdirection.toSql(direction.value), ); } if (counterparty.present) { map['counterparty'] = Variable(counterparty.value); } if (amount.present) { map['amount'] = Variable(amount.value); } if (currency.present) { map['currency'] = Variable(currency.value); } if (soldOn.present) { map['sold_on'] = Variable(soldOn.value); } if (note.present) { map['note'] = Variable(note.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('SalesCompanion(') ..write('id: $id, ') ..write('createdAt: $createdAt, ') ..write('updatedAt: $updatedAt, ') ..write('lastAuthor: $lastAuthor, ') ..write('isDeleted: $isDeleted, ') ..write('schemaRowVersion: $schemaRowVersion, ') ..write('varietyId: $varietyId, ') ..write('direction: $direction, ') ..write('counterparty: $counterparty, ') ..write('amount: $amount, ') ..write('currency: $currency, ') ..write('soldOn: $soldOn, ') ..write('note: $note, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } abstract class _$AppDatabase extends GeneratedDatabase { _$AppDatabase(QueryExecutor e) : super(e); $AppDatabaseManager get managers => $AppDatabaseManager(this); late final $VarietiesTable varieties = $VarietiesTable(this); late final $VarietyVernacularNamesTable varietyVernacularNames = $VarietyVernacularNamesTable(this); late final $SpeciesTable species = $SpeciesTable(this); late final $SpeciesCommonNamesTable speciesCommonNames = $SpeciesCommonNamesTable(this); late final $LotsTable lots = $LotsTable(this); late final $GerminationTestsTable germinationTests = $GerminationTestsTable( this, ); late final $ConditionChecksTable conditionChecks = $ConditionChecksTable( this, ); late final $MovementsTable movements = $MovementsTable(this); late final $PartiesTable parties = $PartiesTable(this); late final $AttachmentsTable attachments = $AttachmentsTable(this); late final $ExternalLinksTable externalLinks = $ExternalLinksTable(this); late final $PlantaresTable plantares = $PlantaresTable(this); late final $SalesTable sales = $SalesTable(this); @override Iterable> get allTables => allSchemaEntities.whereType>(); @override List get allSchemaEntities => [ varieties, varietyVernacularNames, species, speciesCommonNames, lots, germinationTests, conditionChecks, movements, parties, attachments, externalLinks, plantares, sales, ]; } typedef $$VarietiesTableCreateCompanionBuilder = VarietiesCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required String label, Value speciesId, Value cultivarName, Value category, Value notes, Value isDraft, Value isOrganic, Value needsReproduction, Value sowMonths, Value transplantMonths, Value floweringMonths, Value fruitingMonths, Value seedHarvestMonths, Value rowid, }); typedef $$VarietiesTableUpdateCompanionBuilder = VarietiesCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value label, Value speciesId, Value cultivarName, Value category, Value notes, Value isDraft, Value isOrganic, Value needsReproduction, Value sowMonths, Value transplantMonths, Value floweringMonths, Value fruitingMonths, Value seedHarvestMonths, Value rowid, }); class $$VarietiesTableFilterComposer extends Composer<_$AppDatabase, $VarietiesTable> { $$VarietiesTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get label => $composableBuilder( column: $table.label, builder: (column) => ColumnFilters(column), ); ColumnFilters get speciesId => $composableBuilder( column: $table.speciesId, builder: (column) => ColumnFilters(column), ); ColumnFilters get cultivarName => $composableBuilder( column: $table.cultivarName, builder: (column) => ColumnFilters(column), ); ColumnFilters get category => $composableBuilder( column: $table.category, builder: (column) => ColumnFilters(column), ); ColumnFilters get notes => $composableBuilder( column: $table.notes, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDraft => $composableBuilder( column: $table.isDraft, builder: (column) => ColumnFilters(column), ); ColumnFilters get isOrganic => $composableBuilder( column: $table.isOrganic, builder: (column) => ColumnFilters(column), ); ColumnFilters get needsReproduction => $composableBuilder( column: $table.needsReproduction, builder: (column) => ColumnFilters(column), ); ColumnFilters get sowMonths => $composableBuilder( column: $table.sowMonths, builder: (column) => ColumnFilters(column), ); ColumnFilters get transplantMonths => $composableBuilder( column: $table.transplantMonths, builder: (column) => ColumnFilters(column), ); ColumnFilters get floweringMonths => $composableBuilder( column: $table.floweringMonths, builder: (column) => ColumnFilters(column), ); ColumnFilters get fruitingMonths => $composableBuilder( column: $table.fruitingMonths, builder: (column) => ColumnFilters(column), ); ColumnFilters get seedHarvestMonths => $composableBuilder( column: $table.seedHarvestMonths, builder: (column) => ColumnFilters(column), ); } class $$VarietiesTableOrderingComposer extends Composer<_$AppDatabase, $VarietiesTable> { $$VarietiesTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get label => $composableBuilder( column: $table.label, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get speciesId => $composableBuilder( column: $table.speciesId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get cultivarName => $composableBuilder( column: $table.cultivarName, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get category => $composableBuilder( column: $table.category, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get notes => $composableBuilder( column: $table.notes, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDraft => $composableBuilder( column: $table.isDraft, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isOrganic => $composableBuilder( column: $table.isOrganic, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get needsReproduction => $composableBuilder( column: $table.needsReproduction, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get sowMonths => $composableBuilder( column: $table.sowMonths, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get transplantMonths => $composableBuilder( column: $table.transplantMonths, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get floweringMonths => $composableBuilder( column: $table.floweringMonths, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get fruitingMonths => $composableBuilder( column: $table.fruitingMonths, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get seedHarvestMonths => $composableBuilder( column: $table.seedHarvestMonths, builder: (column) => ColumnOrderings(column), ); } class $$VarietiesTableAnnotationComposer extends Composer<_$AppDatabase, $VarietiesTable> { $$VarietiesTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get label => $composableBuilder(column: $table.label, builder: (column) => column); GeneratedColumn get speciesId => $composableBuilder(column: $table.speciesId, builder: (column) => column); GeneratedColumn get cultivarName => $composableBuilder( column: $table.cultivarName, builder: (column) => column, ); GeneratedColumn get category => $composableBuilder(column: $table.category, builder: (column) => column); GeneratedColumn get notes => $composableBuilder(column: $table.notes, builder: (column) => column); GeneratedColumn get isDraft => $composableBuilder(column: $table.isDraft, builder: (column) => column); GeneratedColumn get isOrganic => $composableBuilder(column: $table.isOrganic, builder: (column) => column); GeneratedColumn get needsReproduction => $composableBuilder( column: $table.needsReproduction, builder: (column) => column, ); GeneratedColumn get sowMonths => $composableBuilder(column: $table.sowMonths, builder: (column) => column); GeneratedColumn get transplantMonths => $composableBuilder( column: $table.transplantMonths, builder: (column) => column, ); GeneratedColumn get floweringMonths => $composableBuilder( column: $table.floweringMonths, builder: (column) => column, ); GeneratedColumn get fruitingMonths => $composableBuilder( column: $table.fruitingMonths, builder: (column) => column, ); GeneratedColumn get seedHarvestMonths => $composableBuilder( column: $table.seedHarvestMonths, builder: (column) => column, ); } class $$VarietiesTableTableManager extends RootTableManager< _$AppDatabase, $VarietiesTable, Variety, $$VarietiesTableFilterComposer, $$VarietiesTableOrderingComposer, $$VarietiesTableAnnotationComposer, $$VarietiesTableCreateCompanionBuilder, $$VarietiesTableUpdateCompanionBuilder, (Variety, BaseReferences<_$AppDatabase, $VarietiesTable, Variety>), Variety, PrefetchHooks Function() > { $$VarietiesTableTableManager(_$AppDatabase db, $VarietiesTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$VarietiesTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$VarietiesTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$VarietiesTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value label = const Value.absent(), Value speciesId = const Value.absent(), Value cultivarName = const Value.absent(), Value category = const Value.absent(), Value notes = const Value.absent(), Value isDraft = const Value.absent(), Value isOrganic = const Value.absent(), Value needsReproduction = const Value.absent(), Value sowMonths = const Value.absent(), Value transplantMonths = const Value.absent(), Value floweringMonths = const Value.absent(), Value fruitingMonths = const Value.absent(), Value seedHarvestMonths = const Value.absent(), Value rowid = const Value.absent(), }) => VarietiesCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, label: label, speciesId: speciesId, cultivarName: cultivarName, category: category, notes: notes, isDraft: isDraft, isOrganic: isOrganic, needsReproduction: needsReproduction, sowMonths: sowMonths, transplantMonths: transplantMonths, floweringMonths: floweringMonths, fruitingMonths: fruitingMonths, seedHarvestMonths: seedHarvestMonths, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required String label, Value speciesId = const Value.absent(), Value cultivarName = const Value.absent(), Value category = const Value.absent(), Value notes = const Value.absent(), Value isDraft = const Value.absent(), Value isOrganic = const Value.absent(), Value needsReproduction = const Value.absent(), Value sowMonths = const Value.absent(), Value transplantMonths = const Value.absent(), Value floweringMonths = const Value.absent(), Value fruitingMonths = const Value.absent(), Value seedHarvestMonths = const Value.absent(), Value rowid = const Value.absent(), }) => VarietiesCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, label: label, speciesId: speciesId, cultivarName: cultivarName, category: category, notes: notes, isDraft: isDraft, isOrganic: isOrganic, needsReproduction: needsReproduction, sowMonths: sowMonths, transplantMonths: transplantMonths, floweringMonths: floweringMonths, fruitingMonths: fruitingMonths, seedHarvestMonths: seedHarvestMonths, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$VarietiesTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $VarietiesTable, Variety, $$VarietiesTableFilterComposer, $$VarietiesTableOrderingComposer, $$VarietiesTableAnnotationComposer, $$VarietiesTableCreateCompanionBuilder, $$VarietiesTableUpdateCompanionBuilder, (Variety, BaseReferences<_$AppDatabase, $VarietiesTable, Variety>), Variety, PrefetchHooks Function() >; typedef $$VarietyVernacularNamesTableCreateCompanionBuilder = VarietyVernacularNamesCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required String varietyId, required String name, Value language, Value region, Value rowid, }); typedef $$VarietyVernacularNamesTableUpdateCompanionBuilder = VarietyVernacularNamesCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value varietyId, Value name, Value language, Value region, Value rowid, }); class $$VarietyVernacularNamesTableFilterComposer extends Composer<_$AppDatabase, $VarietyVernacularNamesTable> { $$VarietyVernacularNamesTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get varietyId => $composableBuilder( column: $table.varietyId, builder: (column) => ColumnFilters(column), ); ColumnFilters get name => $composableBuilder( column: $table.name, builder: (column) => ColumnFilters(column), ); ColumnFilters get language => $composableBuilder( column: $table.language, builder: (column) => ColumnFilters(column), ); ColumnFilters get region => $composableBuilder( column: $table.region, builder: (column) => ColumnFilters(column), ); } class $$VarietyVernacularNamesTableOrderingComposer extends Composer<_$AppDatabase, $VarietyVernacularNamesTable> { $$VarietyVernacularNamesTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get varietyId => $composableBuilder( column: $table.varietyId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get name => $composableBuilder( column: $table.name, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get language => $composableBuilder( column: $table.language, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get region => $composableBuilder( column: $table.region, builder: (column) => ColumnOrderings(column), ); } class $$VarietyVernacularNamesTableAnnotationComposer extends Composer<_$AppDatabase, $VarietyVernacularNamesTable> { $$VarietyVernacularNamesTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get varietyId => $composableBuilder(column: $table.varietyId, builder: (column) => column); GeneratedColumn get name => $composableBuilder(column: $table.name, builder: (column) => column); GeneratedColumn get language => $composableBuilder(column: $table.language, builder: (column) => column); GeneratedColumn get region => $composableBuilder(column: $table.region, builder: (column) => column); } class $$VarietyVernacularNamesTableTableManager extends RootTableManager< _$AppDatabase, $VarietyVernacularNamesTable, VarietyVernacularName, $$VarietyVernacularNamesTableFilterComposer, $$VarietyVernacularNamesTableOrderingComposer, $$VarietyVernacularNamesTableAnnotationComposer, $$VarietyVernacularNamesTableCreateCompanionBuilder, $$VarietyVernacularNamesTableUpdateCompanionBuilder, ( VarietyVernacularName, BaseReferences< _$AppDatabase, $VarietyVernacularNamesTable, VarietyVernacularName >, ), VarietyVernacularName, PrefetchHooks Function() > { $$VarietyVernacularNamesTableTableManager( _$AppDatabase db, $VarietyVernacularNamesTable table, ) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$VarietyVernacularNamesTableFilterComposer( $db: db, $table: table, ), createOrderingComposer: () => $$VarietyVernacularNamesTableOrderingComposer( $db: db, $table: table, ), createComputedFieldComposer: () => $$VarietyVernacularNamesTableAnnotationComposer( $db: db, $table: table, ), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value varietyId = const Value.absent(), Value name = const Value.absent(), Value language = const Value.absent(), Value region = const Value.absent(), Value rowid = const Value.absent(), }) => VarietyVernacularNamesCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, varietyId: varietyId, name: name, language: language, region: region, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required String varietyId, required String name, Value language = const Value.absent(), Value region = const Value.absent(), Value rowid = const Value.absent(), }) => VarietyVernacularNamesCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, varietyId: varietyId, name: name, language: language, region: region, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$VarietyVernacularNamesTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $VarietyVernacularNamesTable, VarietyVernacularName, $$VarietyVernacularNamesTableFilterComposer, $$VarietyVernacularNamesTableOrderingComposer, $$VarietyVernacularNamesTableAnnotationComposer, $$VarietyVernacularNamesTableCreateCompanionBuilder, $$VarietyVernacularNamesTableUpdateCompanionBuilder, ( VarietyVernacularName, BaseReferences< _$AppDatabase, $VarietyVernacularNamesTable, VarietyVernacularName >, ), VarietyVernacularName, PrefetchHooks Function() >; typedef $$SpeciesTableCreateCompanionBuilder = SpeciesCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required String scientificName, Value wikidataQid, Value gbifKey, Value family, Value isBundled, Value viabilityYears, Value rowid, }); typedef $$SpeciesTableUpdateCompanionBuilder = SpeciesCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value scientificName, Value wikidataQid, Value gbifKey, Value family, Value isBundled, Value viabilityYears, Value rowid, }); class $$SpeciesTableFilterComposer extends Composer<_$AppDatabase, $SpeciesTable> { $$SpeciesTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get scientificName => $composableBuilder( column: $table.scientificName, builder: (column) => ColumnFilters(column), ); ColumnFilters get wikidataQid => $composableBuilder( column: $table.wikidataQid, builder: (column) => ColumnFilters(column), ); ColumnFilters get gbifKey => $composableBuilder( column: $table.gbifKey, builder: (column) => ColumnFilters(column), ); ColumnFilters get family => $composableBuilder( column: $table.family, builder: (column) => ColumnFilters(column), ); ColumnFilters get isBundled => $composableBuilder( column: $table.isBundled, builder: (column) => ColumnFilters(column), ); ColumnFilters get viabilityYears => $composableBuilder( column: $table.viabilityYears, builder: (column) => ColumnFilters(column), ); } class $$SpeciesTableOrderingComposer extends Composer<_$AppDatabase, $SpeciesTable> { $$SpeciesTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get scientificName => $composableBuilder( column: $table.scientificName, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get wikidataQid => $composableBuilder( column: $table.wikidataQid, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get gbifKey => $composableBuilder( column: $table.gbifKey, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get family => $composableBuilder( column: $table.family, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isBundled => $composableBuilder( column: $table.isBundled, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get viabilityYears => $composableBuilder( column: $table.viabilityYears, builder: (column) => ColumnOrderings(column), ); } class $$SpeciesTableAnnotationComposer extends Composer<_$AppDatabase, $SpeciesTable> { $$SpeciesTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get scientificName => $composableBuilder( column: $table.scientificName, builder: (column) => column, ); GeneratedColumn get wikidataQid => $composableBuilder( column: $table.wikidataQid, builder: (column) => column, ); GeneratedColumn get gbifKey => $composableBuilder(column: $table.gbifKey, builder: (column) => column); GeneratedColumn get family => $composableBuilder(column: $table.family, builder: (column) => column); GeneratedColumn get isBundled => $composableBuilder(column: $table.isBundled, builder: (column) => column); GeneratedColumn get viabilityYears => $composableBuilder( column: $table.viabilityYears, builder: (column) => column, ); } class $$SpeciesTableTableManager extends RootTableManager< _$AppDatabase, $SpeciesTable, Specy, $$SpeciesTableFilterComposer, $$SpeciesTableOrderingComposer, $$SpeciesTableAnnotationComposer, $$SpeciesTableCreateCompanionBuilder, $$SpeciesTableUpdateCompanionBuilder, (Specy, BaseReferences<_$AppDatabase, $SpeciesTable, Specy>), Specy, PrefetchHooks Function() > { $$SpeciesTableTableManager(_$AppDatabase db, $SpeciesTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$SpeciesTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$SpeciesTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$SpeciesTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value scientificName = const Value.absent(), Value wikidataQid = const Value.absent(), Value gbifKey = const Value.absent(), Value family = const Value.absent(), Value isBundled = const Value.absent(), Value viabilityYears = const Value.absent(), Value rowid = const Value.absent(), }) => SpeciesCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, scientificName: scientificName, wikidataQid: wikidataQid, gbifKey: gbifKey, family: family, isBundled: isBundled, viabilityYears: viabilityYears, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required String scientificName, Value wikidataQid = const Value.absent(), Value gbifKey = const Value.absent(), Value family = const Value.absent(), Value isBundled = const Value.absent(), Value viabilityYears = const Value.absent(), Value rowid = const Value.absent(), }) => SpeciesCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, scientificName: scientificName, wikidataQid: wikidataQid, gbifKey: gbifKey, family: family, isBundled: isBundled, viabilityYears: viabilityYears, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$SpeciesTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $SpeciesTable, Specy, $$SpeciesTableFilterComposer, $$SpeciesTableOrderingComposer, $$SpeciesTableAnnotationComposer, $$SpeciesTableCreateCompanionBuilder, $$SpeciesTableUpdateCompanionBuilder, (Specy, BaseReferences<_$AppDatabase, $SpeciesTable, Specy>), Specy, PrefetchHooks Function() >; typedef $$SpeciesCommonNamesTableCreateCompanionBuilder = SpeciesCommonNamesCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required String speciesId, required String name, Value language, Value rowid, }); typedef $$SpeciesCommonNamesTableUpdateCompanionBuilder = SpeciesCommonNamesCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value speciesId, Value name, Value language, Value rowid, }); class $$SpeciesCommonNamesTableFilterComposer extends Composer<_$AppDatabase, $SpeciesCommonNamesTable> { $$SpeciesCommonNamesTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get speciesId => $composableBuilder( column: $table.speciesId, builder: (column) => ColumnFilters(column), ); ColumnFilters get name => $composableBuilder( column: $table.name, builder: (column) => ColumnFilters(column), ); ColumnFilters get language => $composableBuilder( column: $table.language, builder: (column) => ColumnFilters(column), ); } class $$SpeciesCommonNamesTableOrderingComposer extends Composer<_$AppDatabase, $SpeciesCommonNamesTable> { $$SpeciesCommonNamesTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get speciesId => $composableBuilder( column: $table.speciesId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get name => $composableBuilder( column: $table.name, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get language => $composableBuilder( column: $table.language, builder: (column) => ColumnOrderings(column), ); } class $$SpeciesCommonNamesTableAnnotationComposer extends Composer<_$AppDatabase, $SpeciesCommonNamesTable> { $$SpeciesCommonNamesTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get speciesId => $composableBuilder(column: $table.speciesId, builder: (column) => column); GeneratedColumn get name => $composableBuilder(column: $table.name, builder: (column) => column); GeneratedColumn get language => $composableBuilder(column: $table.language, builder: (column) => column); } class $$SpeciesCommonNamesTableTableManager extends RootTableManager< _$AppDatabase, $SpeciesCommonNamesTable, SpeciesCommonName, $$SpeciesCommonNamesTableFilterComposer, $$SpeciesCommonNamesTableOrderingComposer, $$SpeciesCommonNamesTableAnnotationComposer, $$SpeciesCommonNamesTableCreateCompanionBuilder, $$SpeciesCommonNamesTableUpdateCompanionBuilder, ( SpeciesCommonName, BaseReferences< _$AppDatabase, $SpeciesCommonNamesTable, SpeciesCommonName >, ), SpeciesCommonName, PrefetchHooks Function() > { $$SpeciesCommonNamesTableTableManager( _$AppDatabase db, $SpeciesCommonNamesTable table, ) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$SpeciesCommonNamesTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$SpeciesCommonNamesTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$SpeciesCommonNamesTableAnnotationComposer( $db: db, $table: table, ), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value speciesId = const Value.absent(), Value name = const Value.absent(), Value language = const Value.absent(), Value rowid = const Value.absent(), }) => SpeciesCommonNamesCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, speciesId: speciesId, name: name, language: language, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required String speciesId, required String name, Value language = const Value.absent(), Value rowid = const Value.absent(), }) => SpeciesCommonNamesCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, speciesId: speciesId, name: name, language: language, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$SpeciesCommonNamesTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $SpeciesCommonNamesTable, SpeciesCommonName, $$SpeciesCommonNamesTableFilterComposer, $$SpeciesCommonNamesTableOrderingComposer, $$SpeciesCommonNamesTableAnnotationComposer, $$SpeciesCommonNamesTableCreateCompanionBuilder, $$SpeciesCommonNamesTableUpdateCompanionBuilder, ( SpeciesCommonName, BaseReferences< _$AppDatabase, $SpeciesCommonNamesTable, SpeciesCommonName >, ), SpeciesCommonName, PrefetchHooks Function() >; typedef $$LotsTableCreateCompanionBuilder = LotsCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required String varietyId, Value type, Value harvestYear, Value harvestMonth, Value quantityKind, Value quantityPrecise, Value quantityLabel, Value presentation, Value storageLocation, Value offerStatus, Value seedbankId, Value originName, Value originPlace, Value abundance, Value preservationFormat, Value priceAmount, Value priceCurrency, Value rowid, }); typedef $$LotsTableUpdateCompanionBuilder = LotsCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value varietyId, Value type, Value harvestYear, Value harvestMonth, Value quantityKind, Value quantityPrecise, Value quantityLabel, Value presentation, Value storageLocation, Value offerStatus, Value seedbankId, Value originName, Value originPlace, Value abundance, Value preservationFormat, Value priceAmount, Value priceCurrency, Value rowid, }); class $$LotsTableFilterComposer extends Composer<_$AppDatabase, $LotsTable> { $$LotsTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get varietyId => $composableBuilder( column: $table.varietyId, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get type => $composableBuilder( column: $table.type, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get harvestYear => $composableBuilder( column: $table.harvestYear, builder: (column) => ColumnFilters(column), ); ColumnFilters get harvestMonth => $composableBuilder( column: $table.harvestMonth, builder: (column) => ColumnFilters(column), ); ColumnFilters get quantityKind => $composableBuilder( column: $table.quantityKind, builder: (column) => ColumnFilters(column), ); ColumnFilters get quantityPrecise => $composableBuilder( column: $table.quantityPrecise, builder: (column) => ColumnFilters(column), ); ColumnFilters get quantityLabel => $composableBuilder( column: $table.quantityLabel, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get presentation => $composableBuilder( column: $table.presentation, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get storageLocation => $composableBuilder( column: $table.storageLocation, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get offerStatus => $composableBuilder( column: $table.offerStatus, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get seedbankId => $composableBuilder( column: $table.seedbankId, builder: (column) => ColumnFilters(column), ); ColumnFilters get originName => $composableBuilder( column: $table.originName, builder: (column) => ColumnFilters(column), ); ColumnFilters get originPlace => $composableBuilder( column: $table.originPlace, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get abundance => $composableBuilder( column: $table.abundance, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnWithTypeConverterFilters< PreservationFormat?, PreservationFormat, String > get preservationFormat => $composableBuilder( column: $table.preservationFormat, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get priceAmount => $composableBuilder( column: $table.priceAmount, builder: (column) => ColumnFilters(column), ); ColumnFilters get priceCurrency => $composableBuilder( column: $table.priceCurrency, builder: (column) => ColumnFilters(column), ); } class $$LotsTableOrderingComposer extends Composer<_$AppDatabase, $LotsTable> { $$LotsTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get varietyId => $composableBuilder( column: $table.varietyId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get type => $composableBuilder( column: $table.type, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get harvestYear => $composableBuilder( column: $table.harvestYear, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get harvestMonth => $composableBuilder( column: $table.harvestMonth, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get quantityKind => $composableBuilder( column: $table.quantityKind, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get quantityPrecise => $composableBuilder( column: $table.quantityPrecise, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get quantityLabel => $composableBuilder( column: $table.quantityLabel, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get presentation => $composableBuilder( column: $table.presentation, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get storageLocation => $composableBuilder( column: $table.storageLocation, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get offerStatus => $composableBuilder( column: $table.offerStatus, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get seedbankId => $composableBuilder( column: $table.seedbankId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get originName => $composableBuilder( column: $table.originName, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get originPlace => $composableBuilder( column: $table.originPlace, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get abundance => $composableBuilder( column: $table.abundance, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get preservationFormat => $composableBuilder( column: $table.preservationFormat, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get priceAmount => $composableBuilder( column: $table.priceAmount, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get priceCurrency => $composableBuilder( column: $table.priceCurrency, builder: (column) => ColumnOrderings(column), ); } class $$LotsTableAnnotationComposer extends Composer<_$AppDatabase, $LotsTable> { $$LotsTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get varietyId => $composableBuilder(column: $table.varietyId, builder: (column) => column); GeneratedColumnWithTypeConverter get type => $composableBuilder(column: $table.type, builder: (column) => column); GeneratedColumn get harvestYear => $composableBuilder( column: $table.harvestYear, builder: (column) => column, ); GeneratedColumn get harvestMonth => $composableBuilder( column: $table.harvestMonth, builder: (column) => column, ); GeneratedColumn get quantityKind => $composableBuilder( column: $table.quantityKind, builder: (column) => column, ); GeneratedColumn get quantityPrecise => $composableBuilder( column: $table.quantityPrecise, builder: (column) => column, ); GeneratedColumn get quantityLabel => $composableBuilder( column: $table.quantityLabel, builder: (column) => column, ); GeneratedColumnWithTypeConverter get presentation => $composableBuilder( column: $table.presentation, builder: (column) => column, ); GeneratedColumn get storageLocation => $composableBuilder( column: $table.storageLocation, builder: (column) => column, ); GeneratedColumnWithTypeConverter get offerStatus => $composableBuilder( column: $table.offerStatus, builder: (column) => column, ); GeneratedColumn get seedbankId => $composableBuilder( column: $table.seedbankId, builder: (column) => column, ); GeneratedColumn get originName => $composableBuilder( column: $table.originName, builder: (column) => column, ); GeneratedColumn get originPlace => $composableBuilder( column: $table.originPlace, builder: (column) => column, ); GeneratedColumnWithTypeConverter get abundance => $composableBuilder(column: $table.abundance, builder: (column) => column); GeneratedColumnWithTypeConverter get preservationFormat => $composableBuilder( column: $table.preservationFormat, builder: (column) => column, ); GeneratedColumn get priceAmount => $composableBuilder( column: $table.priceAmount, builder: (column) => column, ); GeneratedColumn get priceCurrency => $composableBuilder( column: $table.priceCurrency, builder: (column) => column, ); } class $$LotsTableTableManager extends RootTableManager< _$AppDatabase, $LotsTable, Lot, $$LotsTableFilterComposer, $$LotsTableOrderingComposer, $$LotsTableAnnotationComposer, $$LotsTableCreateCompanionBuilder, $$LotsTableUpdateCompanionBuilder, (Lot, BaseReferences<_$AppDatabase, $LotsTable, Lot>), Lot, PrefetchHooks Function() > { $$LotsTableTableManager(_$AppDatabase db, $LotsTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$LotsTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$LotsTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$LotsTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value varietyId = const Value.absent(), Value type = const Value.absent(), Value harvestYear = const Value.absent(), Value harvestMonth = const Value.absent(), Value quantityKind = const Value.absent(), Value quantityPrecise = const Value.absent(), Value quantityLabel = const Value.absent(), Value presentation = const Value.absent(), Value storageLocation = const Value.absent(), Value offerStatus = const Value.absent(), Value seedbankId = const Value.absent(), Value originName = const Value.absent(), Value originPlace = const Value.absent(), Value abundance = const Value.absent(), Value preservationFormat = const Value.absent(), Value priceAmount = const Value.absent(), Value priceCurrency = const Value.absent(), Value rowid = const Value.absent(), }) => LotsCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, varietyId: varietyId, type: type, harvestYear: harvestYear, harvestMonth: harvestMonth, quantityKind: quantityKind, quantityPrecise: quantityPrecise, quantityLabel: quantityLabel, presentation: presentation, storageLocation: storageLocation, offerStatus: offerStatus, seedbankId: seedbankId, originName: originName, originPlace: originPlace, abundance: abundance, preservationFormat: preservationFormat, priceAmount: priceAmount, priceCurrency: priceCurrency, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required String varietyId, Value type = const Value.absent(), Value harvestYear = const Value.absent(), Value harvestMonth = const Value.absent(), Value quantityKind = const Value.absent(), Value quantityPrecise = const Value.absent(), Value quantityLabel = const Value.absent(), Value presentation = const Value.absent(), Value storageLocation = const Value.absent(), Value offerStatus = const Value.absent(), Value seedbankId = const Value.absent(), Value originName = const Value.absent(), Value originPlace = const Value.absent(), Value abundance = const Value.absent(), Value preservationFormat = const Value.absent(), Value priceAmount = const Value.absent(), Value priceCurrency = const Value.absent(), Value rowid = const Value.absent(), }) => LotsCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, varietyId: varietyId, type: type, harvestYear: harvestYear, harvestMonth: harvestMonth, quantityKind: quantityKind, quantityPrecise: quantityPrecise, quantityLabel: quantityLabel, presentation: presentation, storageLocation: storageLocation, offerStatus: offerStatus, seedbankId: seedbankId, originName: originName, originPlace: originPlace, abundance: abundance, preservationFormat: preservationFormat, priceAmount: priceAmount, priceCurrency: priceCurrency, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$LotsTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $LotsTable, Lot, $$LotsTableFilterComposer, $$LotsTableOrderingComposer, $$LotsTableAnnotationComposer, $$LotsTableCreateCompanionBuilder, $$LotsTableUpdateCompanionBuilder, (Lot, BaseReferences<_$AppDatabase, $LotsTable, Lot>), Lot, PrefetchHooks Function() >; typedef $$GerminationTestsTableCreateCompanionBuilder = GerminationTestsCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required String lotId, Value testedOn, Value sampleSize, Value germinatedCount, Value notes, Value rowid, }); typedef $$GerminationTestsTableUpdateCompanionBuilder = GerminationTestsCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value lotId, Value testedOn, Value sampleSize, Value germinatedCount, Value notes, Value rowid, }); class $$GerminationTestsTableFilterComposer extends Composer<_$AppDatabase, $GerminationTestsTable> { $$GerminationTestsTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get lotId => $composableBuilder( column: $table.lotId, builder: (column) => ColumnFilters(column), ); ColumnFilters get testedOn => $composableBuilder( column: $table.testedOn, builder: (column) => ColumnFilters(column), ); ColumnFilters get sampleSize => $composableBuilder( column: $table.sampleSize, builder: (column) => ColumnFilters(column), ); ColumnFilters get germinatedCount => $composableBuilder( column: $table.germinatedCount, builder: (column) => ColumnFilters(column), ); ColumnFilters get notes => $composableBuilder( column: $table.notes, builder: (column) => ColumnFilters(column), ); } class $$GerminationTestsTableOrderingComposer extends Composer<_$AppDatabase, $GerminationTestsTable> { $$GerminationTestsTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lotId => $composableBuilder( column: $table.lotId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get testedOn => $composableBuilder( column: $table.testedOn, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get sampleSize => $composableBuilder( column: $table.sampleSize, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get germinatedCount => $composableBuilder( column: $table.germinatedCount, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get notes => $composableBuilder( column: $table.notes, builder: (column) => ColumnOrderings(column), ); } class $$GerminationTestsTableAnnotationComposer extends Composer<_$AppDatabase, $GerminationTestsTable> { $$GerminationTestsTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get lotId => $composableBuilder(column: $table.lotId, builder: (column) => column); GeneratedColumn get testedOn => $composableBuilder(column: $table.testedOn, builder: (column) => column); GeneratedColumn get sampleSize => $composableBuilder( column: $table.sampleSize, builder: (column) => column, ); GeneratedColumn get germinatedCount => $composableBuilder( column: $table.germinatedCount, builder: (column) => column, ); GeneratedColumn get notes => $composableBuilder(column: $table.notes, builder: (column) => column); } class $$GerminationTestsTableTableManager extends RootTableManager< _$AppDatabase, $GerminationTestsTable, GerminationTest, $$GerminationTestsTableFilterComposer, $$GerminationTestsTableOrderingComposer, $$GerminationTestsTableAnnotationComposer, $$GerminationTestsTableCreateCompanionBuilder, $$GerminationTestsTableUpdateCompanionBuilder, ( GerminationTest, BaseReferences< _$AppDatabase, $GerminationTestsTable, GerminationTest >, ), GerminationTest, PrefetchHooks Function() > { $$GerminationTestsTableTableManager( _$AppDatabase db, $GerminationTestsTable table, ) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$GerminationTestsTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$GerminationTestsTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$GerminationTestsTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value lotId = const Value.absent(), Value testedOn = const Value.absent(), Value sampleSize = const Value.absent(), Value germinatedCount = const Value.absent(), Value notes = const Value.absent(), Value rowid = const Value.absent(), }) => GerminationTestsCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, lotId: lotId, testedOn: testedOn, sampleSize: sampleSize, germinatedCount: germinatedCount, notes: notes, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required String lotId, Value testedOn = const Value.absent(), Value sampleSize = const Value.absent(), Value germinatedCount = const Value.absent(), Value notes = const Value.absent(), Value rowid = const Value.absent(), }) => GerminationTestsCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, lotId: lotId, testedOn: testedOn, sampleSize: sampleSize, germinatedCount: germinatedCount, notes: notes, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$GerminationTestsTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $GerminationTestsTable, GerminationTest, $$GerminationTestsTableFilterComposer, $$GerminationTestsTableOrderingComposer, $$GerminationTestsTableAnnotationComposer, $$GerminationTestsTableCreateCompanionBuilder, $$GerminationTestsTableUpdateCompanionBuilder, ( GerminationTest, BaseReferences<_$AppDatabase, $GerminationTestsTable, GerminationTest>, ), GerminationTest, PrefetchHooks Function() >; typedef $$ConditionChecksTableCreateCompanionBuilder = ConditionChecksCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required String lotId, Value checkedOn, Value containerCount, Value desiccantState, Value notes, Value rowid, }); typedef $$ConditionChecksTableUpdateCompanionBuilder = ConditionChecksCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value lotId, Value checkedOn, Value containerCount, Value desiccantState, Value notes, Value rowid, }); class $$ConditionChecksTableFilterComposer extends Composer<_$AppDatabase, $ConditionChecksTable> { $$ConditionChecksTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get lotId => $composableBuilder( column: $table.lotId, builder: (column) => ColumnFilters(column), ); ColumnFilters get checkedOn => $composableBuilder( column: $table.checkedOn, builder: (column) => ColumnFilters(column), ); ColumnFilters get containerCount => $composableBuilder( column: $table.containerCount, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get desiccantState => $composableBuilder( column: $table.desiccantState, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get notes => $composableBuilder( column: $table.notes, builder: (column) => ColumnFilters(column), ); } class $$ConditionChecksTableOrderingComposer extends Composer<_$AppDatabase, $ConditionChecksTable> { $$ConditionChecksTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lotId => $composableBuilder( column: $table.lotId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get checkedOn => $composableBuilder( column: $table.checkedOn, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get containerCount => $composableBuilder( column: $table.containerCount, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get desiccantState => $composableBuilder( column: $table.desiccantState, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get notes => $composableBuilder( column: $table.notes, builder: (column) => ColumnOrderings(column), ); } class $$ConditionChecksTableAnnotationComposer extends Composer<_$AppDatabase, $ConditionChecksTable> { $$ConditionChecksTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get lotId => $composableBuilder(column: $table.lotId, builder: (column) => column); GeneratedColumn get checkedOn => $composableBuilder(column: $table.checkedOn, builder: (column) => column); GeneratedColumn get containerCount => $composableBuilder( column: $table.containerCount, builder: (column) => column, ); GeneratedColumnWithTypeConverter get desiccantState => $composableBuilder( column: $table.desiccantState, builder: (column) => column, ); GeneratedColumn get notes => $composableBuilder(column: $table.notes, builder: (column) => column); } class $$ConditionChecksTableTableManager extends RootTableManager< _$AppDatabase, $ConditionChecksTable, ConditionCheck, $$ConditionChecksTableFilterComposer, $$ConditionChecksTableOrderingComposer, $$ConditionChecksTableAnnotationComposer, $$ConditionChecksTableCreateCompanionBuilder, $$ConditionChecksTableUpdateCompanionBuilder, ( ConditionCheck, BaseReferences< _$AppDatabase, $ConditionChecksTable, ConditionCheck >, ), ConditionCheck, PrefetchHooks Function() > { $$ConditionChecksTableTableManager( _$AppDatabase db, $ConditionChecksTable table, ) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$ConditionChecksTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$ConditionChecksTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$ConditionChecksTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value lotId = const Value.absent(), Value checkedOn = const Value.absent(), Value containerCount = const Value.absent(), Value desiccantState = const Value.absent(), Value notes = const Value.absent(), Value rowid = const Value.absent(), }) => ConditionChecksCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, lotId: lotId, checkedOn: checkedOn, containerCount: containerCount, desiccantState: desiccantState, notes: notes, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required String lotId, Value checkedOn = const Value.absent(), Value containerCount = const Value.absent(), Value desiccantState = const Value.absent(), Value notes = const Value.absent(), Value rowid = const Value.absent(), }) => ConditionChecksCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, lotId: lotId, checkedOn: checkedOn, containerCount: containerCount, desiccantState: desiccantState, notes: notes, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$ConditionChecksTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $ConditionChecksTable, ConditionCheck, $$ConditionChecksTableFilterComposer, $$ConditionChecksTableOrderingComposer, $$ConditionChecksTableAnnotationComposer, $$ConditionChecksTableCreateCompanionBuilder, $$ConditionChecksTableUpdateCompanionBuilder, ( ConditionCheck, BaseReferences<_$AppDatabase, $ConditionChecksTable, ConditionCheck>, ), ConditionCheck, PrefetchHooks Function() >; typedef $$MovementsTableCreateCompanionBuilder = MovementsCompanion Function({ required String id, required int createdAt, required String lastAuthor, Value schemaRowVersion, required String lotId, required MovementType type, Value occurredOn, Value counterpartyId, Value quantityKind, Value quantityPrecise, Value quantityLabel, Value parentMovementId, Value plantareId, Value notes, Value rowid, }); typedef $$MovementsTableUpdateCompanionBuilder = MovementsCompanion Function({ Value id, Value createdAt, Value lastAuthor, Value schemaRowVersion, Value lotId, Value type, Value occurredOn, Value counterpartyId, Value quantityKind, Value quantityPrecise, Value quantityLabel, Value parentMovementId, Value plantareId, Value notes, Value rowid, }); class $$MovementsTableFilterComposer extends Composer<_$AppDatabase, $MovementsTable> { $$MovementsTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get lotId => $composableBuilder( column: $table.lotId, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get type => $composableBuilder( column: $table.type, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get occurredOn => $composableBuilder( column: $table.occurredOn, builder: (column) => ColumnFilters(column), ); ColumnFilters get counterpartyId => $composableBuilder( column: $table.counterpartyId, builder: (column) => ColumnFilters(column), ); ColumnFilters get quantityKind => $composableBuilder( column: $table.quantityKind, builder: (column) => ColumnFilters(column), ); ColumnFilters get quantityPrecise => $composableBuilder( column: $table.quantityPrecise, builder: (column) => ColumnFilters(column), ); ColumnFilters get quantityLabel => $composableBuilder( column: $table.quantityLabel, builder: (column) => ColumnFilters(column), ); ColumnFilters get parentMovementId => $composableBuilder( column: $table.parentMovementId, builder: (column) => ColumnFilters(column), ); ColumnFilters get plantareId => $composableBuilder( column: $table.plantareId, builder: (column) => ColumnFilters(column), ); ColumnFilters get notes => $composableBuilder( column: $table.notes, builder: (column) => ColumnFilters(column), ); } class $$MovementsTableOrderingComposer extends Composer<_$AppDatabase, $MovementsTable> { $$MovementsTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lotId => $composableBuilder( column: $table.lotId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get type => $composableBuilder( column: $table.type, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get occurredOn => $composableBuilder( column: $table.occurredOn, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get counterpartyId => $composableBuilder( column: $table.counterpartyId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get quantityKind => $composableBuilder( column: $table.quantityKind, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get quantityPrecise => $composableBuilder( column: $table.quantityPrecise, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get quantityLabel => $composableBuilder( column: $table.quantityLabel, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get parentMovementId => $composableBuilder( column: $table.parentMovementId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get plantareId => $composableBuilder( column: $table.plantareId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get notes => $composableBuilder( column: $table.notes, builder: (column) => ColumnOrderings(column), ); } class $$MovementsTableAnnotationComposer extends Composer<_$AppDatabase, $MovementsTable> { $$MovementsTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get lotId => $composableBuilder(column: $table.lotId, builder: (column) => column); GeneratedColumnWithTypeConverter get type => $composableBuilder(column: $table.type, builder: (column) => column); GeneratedColumn get occurredOn => $composableBuilder( column: $table.occurredOn, builder: (column) => column, ); GeneratedColumn get counterpartyId => $composableBuilder( column: $table.counterpartyId, builder: (column) => column, ); GeneratedColumn get quantityKind => $composableBuilder( column: $table.quantityKind, builder: (column) => column, ); GeneratedColumn get quantityPrecise => $composableBuilder( column: $table.quantityPrecise, builder: (column) => column, ); GeneratedColumn get quantityLabel => $composableBuilder( column: $table.quantityLabel, builder: (column) => column, ); GeneratedColumn get parentMovementId => $composableBuilder( column: $table.parentMovementId, builder: (column) => column, ); GeneratedColumn get plantareId => $composableBuilder( column: $table.plantareId, builder: (column) => column, ); GeneratedColumn get notes => $composableBuilder(column: $table.notes, builder: (column) => column); } class $$MovementsTableTableManager extends RootTableManager< _$AppDatabase, $MovementsTable, Movement, $$MovementsTableFilterComposer, $$MovementsTableOrderingComposer, $$MovementsTableAnnotationComposer, $$MovementsTableCreateCompanionBuilder, $$MovementsTableUpdateCompanionBuilder, (Movement, BaseReferences<_$AppDatabase, $MovementsTable, Movement>), Movement, PrefetchHooks Function() > { $$MovementsTableTableManager(_$AppDatabase db, $MovementsTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$MovementsTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$MovementsTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$MovementsTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value lotId = const Value.absent(), Value type = const Value.absent(), Value occurredOn = const Value.absent(), Value counterpartyId = const Value.absent(), Value quantityKind = const Value.absent(), Value quantityPrecise = const Value.absent(), Value quantityLabel = const Value.absent(), Value parentMovementId = const Value.absent(), Value plantareId = const Value.absent(), Value notes = const Value.absent(), Value rowid = const Value.absent(), }) => MovementsCompanion( id: id, createdAt: createdAt, lastAuthor: lastAuthor, schemaRowVersion: schemaRowVersion, lotId: lotId, type: type, occurredOn: occurredOn, counterpartyId: counterpartyId, quantityKind: quantityKind, quantityPrecise: quantityPrecise, quantityLabel: quantityLabel, parentMovementId: parentMovementId, plantareId: plantareId, notes: notes, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String lastAuthor, Value schemaRowVersion = const Value.absent(), required String lotId, required MovementType type, Value occurredOn = const Value.absent(), Value counterpartyId = const Value.absent(), Value quantityKind = const Value.absent(), Value quantityPrecise = const Value.absent(), Value quantityLabel = const Value.absent(), Value parentMovementId = const Value.absent(), Value plantareId = const Value.absent(), Value notes = const Value.absent(), Value rowid = const Value.absent(), }) => MovementsCompanion.insert( id: id, createdAt: createdAt, lastAuthor: lastAuthor, schemaRowVersion: schemaRowVersion, lotId: lotId, type: type, occurredOn: occurredOn, counterpartyId: counterpartyId, quantityKind: quantityKind, quantityPrecise: quantityPrecise, quantityLabel: quantityLabel, parentMovementId: parentMovementId, plantareId: plantareId, notes: notes, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$MovementsTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $MovementsTable, Movement, $$MovementsTableFilterComposer, $$MovementsTableOrderingComposer, $$MovementsTableAnnotationComposer, $$MovementsTableCreateCompanionBuilder, $$MovementsTableUpdateCompanionBuilder, (Movement, BaseReferences<_$AppDatabase, $MovementsTable, Movement>), Movement, PrefetchHooks Function() >; typedef $$PartiesTableCreateCompanionBuilder = PartiesCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required String displayName, Value publicKey, Value kind, Value note, Value rowid, }); typedef $$PartiesTableUpdateCompanionBuilder = PartiesCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value displayName, Value publicKey, Value kind, Value note, Value rowid, }); class $$PartiesTableFilterComposer extends Composer<_$AppDatabase, $PartiesTable> { $$PartiesTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get displayName => $composableBuilder( column: $table.displayName, builder: (column) => ColumnFilters(column), ); ColumnFilters get publicKey => $composableBuilder( column: $table.publicKey, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get kind => $composableBuilder( column: $table.kind, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get note => $composableBuilder( column: $table.note, builder: (column) => ColumnFilters(column), ); } class $$PartiesTableOrderingComposer extends Composer<_$AppDatabase, $PartiesTable> { $$PartiesTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get displayName => $composableBuilder( column: $table.displayName, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get publicKey => $composableBuilder( column: $table.publicKey, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get kind => $composableBuilder( column: $table.kind, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get note => $composableBuilder( column: $table.note, builder: (column) => ColumnOrderings(column), ); } class $$PartiesTableAnnotationComposer extends Composer<_$AppDatabase, $PartiesTable> { $$PartiesTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get displayName => $composableBuilder( column: $table.displayName, builder: (column) => column, ); GeneratedColumn get publicKey => $composableBuilder(column: $table.publicKey, builder: (column) => column); GeneratedColumnWithTypeConverter get kind => $composableBuilder(column: $table.kind, builder: (column) => column); GeneratedColumn get note => $composableBuilder(column: $table.note, builder: (column) => column); } class $$PartiesTableTableManager extends RootTableManager< _$AppDatabase, $PartiesTable, Party, $$PartiesTableFilterComposer, $$PartiesTableOrderingComposer, $$PartiesTableAnnotationComposer, $$PartiesTableCreateCompanionBuilder, $$PartiesTableUpdateCompanionBuilder, (Party, BaseReferences<_$AppDatabase, $PartiesTable, Party>), Party, PrefetchHooks Function() > { $$PartiesTableTableManager(_$AppDatabase db, $PartiesTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$PartiesTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$PartiesTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$PartiesTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value displayName = const Value.absent(), Value publicKey = const Value.absent(), Value kind = const Value.absent(), Value note = const Value.absent(), Value rowid = const Value.absent(), }) => PartiesCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, displayName: displayName, publicKey: publicKey, kind: kind, note: note, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required String displayName, Value publicKey = const Value.absent(), Value kind = const Value.absent(), Value note = const Value.absent(), Value rowid = const Value.absent(), }) => PartiesCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, displayName: displayName, publicKey: publicKey, kind: kind, note: note, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$PartiesTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $PartiesTable, Party, $$PartiesTableFilterComposer, $$PartiesTableOrderingComposer, $$PartiesTableAnnotationComposer, $$PartiesTableCreateCompanionBuilder, $$PartiesTableUpdateCompanionBuilder, (Party, BaseReferences<_$AppDatabase, $PartiesTable, Party>), Party, PrefetchHooks Function() >; typedef $$AttachmentsTableCreateCompanionBuilder = AttachmentsCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required ParentType parentType, required String parentId, required AttachmentKind kind, Value uri, Value bytes, Value mimeType, Value sortOrder, Value rowid, }); typedef $$AttachmentsTableUpdateCompanionBuilder = AttachmentsCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value parentType, Value parentId, Value kind, Value uri, Value bytes, Value mimeType, Value sortOrder, Value rowid, }); class $$AttachmentsTableFilterComposer extends Composer<_$AppDatabase, $AttachmentsTable> { $$AttachmentsTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get parentType => $composableBuilder( column: $table.parentType, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get parentId => $composableBuilder( column: $table.parentId, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get kind => $composableBuilder( column: $table.kind, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get uri => $composableBuilder( column: $table.uri, builder: (column) => ColumnFilters(column), ); ColumnFilters get bytes => $composableBuilder( column: $table.bytes, builder: (column) => ColumnFilters(column), ); ColumnFilters get mimeType => $composableBuilder( column: $table.mimeType, builder: (column) => ColumnFilters(column), ); ColumnFilters get sortOrder => $composableBuilder( column: $table.sortOrder, builder: (column) => ColumnFilters(column), ); } class $$AttachmentsTableOrderingComposer extends Composer<_$AppDatabase, $AttachmentsTable> { $$AttachmentsTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get parentType => $composableBuilder( column: $table.parentType, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get parentId => $composableBuilder( column: $table.parentId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get kind => $composableBuilder( column: $table.kind, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get uri => $composableBuilder( column: $table.uri, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get bytes => $composableBuilder( column: $table.bytes, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get mimeType => $composableBuilder( column: $table.mimeType, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get sortOrder => $composableBuilder( column: $table.sortOrder, builder: (column) => ColumnOrderings(column), ); } class $$AttachmentsTableAnnotationComposer extends Composer<_$AppDatabase, $AttachmentsTable> { $$AttachmentsTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumnWithTypeConverter get parentType => $composableBuilder( column: $table.parentType, builder: (column) => column, ); GeneratedColumn get parentId => $composableBuilder(column: $table.parentId, builder: (column) => column); GeneratedColumnWithTypeConverter get kind => $composableBuilder(column: $table.kind, builder: (column) => column); GeneratedColumn get uri => $composableBuilder(column: $table.uri, builder: (column) => column); GeneratedColumn get bytes => $composableBuilder(column: $table.bytes, builder: (column) => column); GeneratedColumn get mimeType => $composableBuilder(column: $table.mimeType, builder: (column) => column); GeneratedColumn get sortOrder => $composableBuilder(column: $table.sortOrder, builder: (column) => column); } class $$AttachmentsTableTableManager extends RootTableManager< _$AppDatabase, $AttachmentsTable, Attachment, $$AttachmentsTableFilterComposer, $$AttachmentsTableOrderingComposer, $$AttachmentsTableAnnotationComposer, $$AttachmentsTableCreateCompanionBuilder, $$AttachmentsTableUpdateCompanionBuilder, ( Attachment, BaseReferences<_$AppDatabase, $AttachmentsTable, Attachment>, ), Attachment, PrefetchHooks Function() > { $$AttachmentsTableTableManager(_$AppDatabase db, $AttachmentsTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$AttachmentsTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$AttachmentsTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$AttachmentsTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value parentType = const Value.absent(), Value parentId = const Value.absent(), Value kind = const Value.absent(), Value uri = const Value.absent(), Value bytes = const Value.absent(), Value mimeType = const Value.absent(), Value sortOrder = const Value.absent(), Value rowid = const Value.absent(), }) => AttachmentsCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, parentType: parentType, parentId: parentId, kind: kind, uri: uri, bytes: bytes, mimeType: mimeType, sortOrder: sortOrder, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required ParentType parentType, required String parentId, required AttachmentKind kind, Value uri = const Value.absent(), Value bytes = const Value.absent(), Value mimeType = const Value.absent(), Value sortOrder = const Value.absent(), Value rowid = const Value.absent(), }) => AttachmentsCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, parentType: parentType, parentId: parentId, kind: kind, uri: uri, bytes: bytes, mimeType: mimeType, sortOrder: sortOrder, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$AttachmentsTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $AttachmentsTable, Attachment, $$AttachmentsTableFilterComposer, $$AttachmentsTableOrderingComposer, $$AttachmentsTableAnnotationComposer, $$AttachmentsTableCreateCompanionBuilder, $$AttachmentsTableUpdateCompanionBuilder, ( Attachment, BaseReferences<_$AppDatabase, $AttachmentsTable, Attachment>, ), Attachment, PrefetchHooks Function() >; typedef $$ExternalLinksTableCreateCompanionBuilder = ExternalLinksCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, required ParentType parentType, required String parentId, required String url, Value title, Value rowid, }); typedef $$ExternalLinksTableUpdateCompanionBuilder = ExternalLinksCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value parentType, Value parentId, Value url, Value title, Value rowid, }); class $$ExternalLinksTableFilterComposer extends Composer<_$AppDatabase, $ExternalLinksTable> { $$ExternalLinksTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get parentType => $composableBuilder( column: $table.parentType, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get parentId => $composableBuilder( column: $table.parentId, builder: (column) => ColumnFilters(column), ); ColumnFilters get url => $composableBuilder( column: $table.url, builder: (column) => ColumnFilters(column), ); ColumnFilters get title => $composableBuilder( column: $table.title, builder: (column) => ColumnFilters(column), ); } class $$ExternalLinksTableOrderingComposer extends Composer<_$AppDatabase, $ExternalLinksTable> { $$ExternalLinksTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get parentType => $composableBuilder( column: $table.parentType, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get parentId => $composableBuilder( column: $table.parentId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get url => $composableBuilder( column: $table.url, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get title => $composableBuilder( column: $table.title, builder: (column) => ColumnOrderings(column), ); } class $$ExternalLinksTableAnnotationComposer extends Composer<_$AppDatabase, $ExternalLinksTable> { $$ExternalLinksTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumnWithTypeConverter get parentType => $composableBuilder( column: $table.parentType, builder: (column) => column, ); GeneratedColumn get parentId => $composableBuilder(column: $table.parentId, builder: (column) => column); GeneratedColumn get url => $composableBuilder(column: $table.url, builder: (column) => column); GeneratedColumn get title => $composableBuilder(column: $table.title, builder: (column) => column); } class $$ExternalLinksTableTableManager extends RootTableManager< _$AppDatabase, $ExternalLinksTable, ExternalLink, $$ExternalLinksTableFilterComposer, $$ExternalLinksTableOrderingComposer, $$ExternalLinksTableAnnotationComposer, $$ExternalLinksTableCreateCompanionBuilder, $$ExternalLinksTableUpdateCompanionBuilder, ( ExternalLink, BaseReferences<_$AppDatabase, $ExternalLinksTable, ExternalLink>, ), ExternalLink, PrefetchHooks Function() > { $$ExternalLinksTableTableManager(_$AppDatabase db, $ExternalLinksTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$ExternalLinksTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$ExternalLinksTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$ExternalLinksTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value parentType = const Value.absent(), Value parentId = const Value.absent(), Value url = const Value.absent(), Value title = const Value.absent(), Value rowid = const Value.absent(), }) => ExternalLinksCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, parentType: parentType, parentId: parentId, url: url, title: title, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), required ParentType parentType, required String parentId, required String url, Value title = const Value.absent(), Value rowid = const Value.absent(), }) => ExternalLinksCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, parentType: parentType, parentId: parentId, url: url, title: title, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$ExternalLinksTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $ExternalLinksTable, ExternalLink, $$ExternalLinksTableFilterComposer, $$ExternalLinksTableOrderingComposer, $$ExternalLinksTableAnnotationComposer, $$ExternalLinksTableCreateCompanionBuilder, $$ExternalLinksTableUpdateCompanionBuilder, ( ExternalLink, BaseReferences<_$AppDatabase, $ExternalLinksTable, ExternalLink>, ), ExternalLink, PrefetchHooks Function() >; typedef $$PlantaresTableCreateCompanionBuilder = PlantaresCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, Value varietyId, required PlantareDirection direction, Value counterparty, Value owedDescription, required int madeOn, Value dueBy, Value status, Value settledOn, Value note, Value rowid, }); typedef $$PlantaresTableUpdateCompanionBuilder = PlantaresCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value varietyId, Value direction, Value counterparty, Value owedDescription, Value madeOn, Value dueBy, Value status, Value settledOn, Value note, Value rowid, }); class $$PlantaresTableFilterComposer extends Composer<_$AppDatabase, $PlantaresTable> { $$PlantaresTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get varietyId => $composableBuilder( column: $table.varietyId, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get direction => $composableBuilder( column: $table.direction, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get counterparty => $composableBuilder( column: $table.counterparty, builder: (column) => ColumnFilters(column), ); ColumnFilters get owedDescription => $composableBuilder( column: $table.owedDescription, builder: (column) => ColumnFilters(column), ); ColumnFilters get madeOn => $composableBuilder( column: $table.madeOn, builder: (column) => ColumnFilters(column), ); ColumnFilters get dueBy => $composableBuilder( column: $table.dueBy, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get status => $composableBuilder( column: $table.status, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get settledOn => $composableBuilder( column: $table.settledOn, builder: (column) => ColumnFilters(column), ); ColumnFilters get note => $composableBuilder( column: $table.note, builder: (column) => ColumnFilters(column), ); } class $$PlantaresTableOrderingComposer extends Composer<_$AppDatabase, $PlantaresTable> { $$PlantaresTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get varietyId => $composableBuilder( column: $table.varietyId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get direction => $composableBuilder( column: $table.direction, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get counterparty => $composableBuilder( column: $table.counterparty, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get owedDescription => $composableBuilder( column: $table.owedDescription, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get madeOn => $composableBuilder( column: $table.madeOn, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get dueBy => $composableBuilder( column: $table.dueBy, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get status => $composableBuilder( column: $table.status, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get settledOn => $composableBuilder( column: $table.settledOn, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get note => $composableBuilder( column: $table.note, builder: (column) => ColumnOrderings(column), ); } class $$PlantaresTableAnnotationComposer extends Composer<_$AppDatabase, $PlantaresTable> { $$PlantaresTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get varietyId => $composableBuilder(column: $table.varietyId, builder: (column) => column); GeneratedColumnWithTypeConverter get direction => $composableBuilder(column: $table.direction, builder: (column) => column); GeneratedColumn get counterparty => $composableBuilder( column: $table.counterparty, builder: (column) => column, ); GeneratedColumn get owedDescription => $composableBuilder( column: $table.owedDescription, builder: (column) => column, ); GeneratedColumn get madeOn => $composableBuilder(column: $table.madeOn, builder: (column) => column); GeneratedColumn get dueBy => $composableBuilder(column: $table.dueBy, builder: (column) => column); GeneratedColumnWithTypeConverter get status => $composableBuilder(column: $table.status, builder: (column) => column); GeneratedColumn get settledOn => $composableBuilder(column: $table.settledOn, builder: (column) => column); GeneratedColumn get note => $composableBuilder(column: $table.note, builder: (column) => column); } class $$PlantaresTableTableManager extends RootTableManager< _$AppDatabase, $PlantaresTable, Plantare, $$PlantaresTableFilterComposer, $$PlantaresTableOrderingComposer, $$PlantaresTableAnnotationComposer, $$PlantaresTableCreateCompanionBuilder, $$PlantaresTableUpdateCompanionBuilder, (Plantare, BaseReferences<_$AppDatabase, $PlantaresTable, Plantare>), Plantare, PrefetchHooks Function() > { $$PlantaresTableTableManager(_$AppDatabase db, $PlantaresTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$PlantaresTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$PlantaresTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$PlantaresTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value varietyId = const Value.absent(), Value direction = const Value.absent(), Value counterparty = const Value.absent(), Value owedDescription = const Value.absent(), Value madeOn = const Value.absent(), Value dueBy = const Value.absent(), Value status = const Value.absent(), Value settledOn = const Value.absent(), Value note = const Value.absent(), Value rowid = const Value.absent(), }) => PlantaresCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, varietyId: varietyId, direction: direction, counterparty: counterparty, owedDescription: owedDescription, madeOn: madeOn, dueBy: dueBy, status: status, settledOn: settledOn, note: note, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value varietyId = const Value.absent(), required PlantareDirection direction, Value counterparty = const Value.absent(), Value owedDescription = const Value.absent(), required int madeOn, Value dueBy = const Value.absent(), Value status = const Value.absent(), Value settledOn = const Value.absent(), Value note = const Value.absent(), Value rowid = const Value.absent(), }) => PlantaresCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, varietyId: varietyId, direction: direction, counterparty: counterparty, owedDescription: owedDescription, madeOn: madeOn, dueBy: dueBy, status: status, settledOn: settledOn, note: note, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$PlantaresTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $PlantaresTable, Plantare, $$PlantaresTableFilterComposer, $$PlantaresTableOrderingComposer, $$PlantaresTableAnnotationComposer, $$PlantaresTableCreateCompanionBuilder, $$PlantaresTableUpdateCompanionBuilder, (Plantare, BaseReferences<_$AppDatabase, $PlantaresTable, Plantare>), Plantare, PrefetchHooks Function() >; typedef $$SalesTableCreateCompanionBuilder = SalesCompanion Function({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted, Value schemaRowVersion, Value varietyId, required SaleDirection direction, Value counterparty, Value amount, Value currency, required int soldOn, Value note, Value rowid, }); typedef $$SalesTableUpdateCompanionBuilder = SalesCompanion Function({ Value id, Value createdAt, Value updatedAt, Value lastAuthor, Value isDeleted, Value schemaRowVersion, Value varietyId, Value direction, Value counterparty, Value amount, Value currency, Value soldOn, Value note, Value rowid, }); class $$SalesTableFilterComposer extends Composer<_$AppDatabase, $SalesTable> { $$SalesTableFilterComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnFilters get id => $composableBuilder( column: $table.id, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnFilters(column), ); ColumnFilters get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnFilters(column), ); ColumnFilters get varietyId => $composableBuilder( column: $table.varietyId, builder: (column) => ColumnFilters(column), ); ColumnWithTypeConverterFilters get direction => $composableBuilder( column: $table.direction, builder: (column) => ColumnWithTypeConverterFilters(column), ); ColumnFilters get counterparty => $composableBuilder( column: $table.counterparty, builder: (column) => ColumnFilters(column), ); ColumnFilters get amount => $composableBuilder( column: $table.amount, builder: (column) => ColumnFilters(column), ); ColumnFilters get currency => $composableBuilder( column: $table.currency, builder: (column) => ColumnFilters(column), ); ColumnFilters get soldOn => $composableBuilder( column: $table.soldOn, builder: (column) => ColumnFilters(column), ); ColumnFilters get note => $composableBuilder( column: $table.note, builder: (column) => ColumnFilters(column), ); } class $$SalesTableOrderingComposer extends Composer<_$AppDatabase, $SalesTable> { $$SalesTableOrderingComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); ColumnOrderings get id => $composableBuilder( column: $table.id, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDeleted => $composableBuilder( column: $table.isDeleted, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get varietyId => $composableBuilder( column: $table.varietyId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get direction => $composableBuilder( column: $table.direction, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get counterparty => $composableBuilder( column: $table.counterparty, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get amount => $composableBuilder( column: $table.amount, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get currency => $composableBuilder( column: $table.currency, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get soldOn => $composableBuilder( column: $table.soldOn, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get note => $composableBuilder( column: $table.note, builder: (column) => ColumnOrderings(column), ); } class $$SalesTableAnnotationComposer extends Composer<_$AppDatabase, $SalesTable> { $$SalesTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); GeneratedColumn get lastAuthor => $composableBuilder( column: $table.lastAuthor, builder: (column) => column, ); GeneratedColumn get isDeleted => $composableBuilder(column: $table.isDeleted, builder: (column) => column); GeneratedColumn get schemaRowVersion => $composableBuilder( column: $table.schemaRowVersion, builder: (column) => column, ); GeneratedColumn get varietyId => $composableBuilder(column: $table.varietyId, builder: (column) => column); GeneratedColumnWithTypeConverter get direction => $composableBuilder(column: $table.direction, builder: (column) => column); GeneratedColumn get counterparty => $composableBuilder( column: $table.counterparty, builder: (column) => column, ); GeneratedColumn get amount => $composableBuilder(column: $table.amount, builder: (column) => column); GeneratedColumn get currency => $composableBuilder(column: $table.currency, builder: (column) => column); GeneratedColumn get soldOn => $composableBuilder(column: $table.soldOn, builder: (column) => column); GeneratedColumn get note => $composableBuilder(column: $table.note, builder: (column) => column); } class $$SalesTableTableManager extends RootTableManager< _$AppDatabase, $SalesTable, Sale, $$SalesTableFilterComposer, $$SalesTableOrderingComposer, $$SalesTableAnnotationComposer, $$SalesTableCreateCompanionBuilder, $$SalesTableUpdateCompanionBuilder, (Sale, BaseReferences<_$AppDatabase, $SalesTable, Sale>), Sale, PrefetchHooks Function() > { $$SalesTableTableManager(_$AppDatabase db, $SalesTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$SalesTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$SalesTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$SalesTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value createdAt = const Value.absent(), Value updatedAt = const Value.absent(), Value lastAuthor = const Value.absent(), Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value varietyId = const Value.absent(), Value direction = const Value.absent(), Value counterparty = const Value.absent(), Value amount = const Value.absent(), Value currency = const Value.absent(), Value soldOn = const Value.absent(), Value note = const Value.absent(), Value rowid = const Value.absent(), }) => SalesCompanion( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, varietyId: varietyId, direction: direction, counterparty: counterparty, amount: amount, currency: currency, soldOn: soldOn, note: note, rowid: rowid, ), createCompanionCallback: ({ required String id, required int createdAt, required String updatedAt, required String lastAuthor, Value isDeleted = const Value.absent(), Value schemaRowVersion = const Value.absent(), Value varietyId = const Value.absent(), required SaleDirection direction, Value counterparty = const Value.absent(), Value amount = const Value.absent(), Value currency = const Value.absent(), required int soldOn, Value note = const Value.absent(), Value rowid = const Value.absent(), }) => SalesCompanion.insert( id: id, createdAt: createdAt, updatedAt: updatedAt, lastAuthor: lastAuthor, isDeleted: isDeleted, schemaRowVersion: schemaRowVersion, varietyId: varietyId, direction: direction, counterparty: counterparty, amount: amount, currency: currency, soldOn: soldOn, note: note, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$SalesTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $SalesTable, Sale, $$SalesTableFilterComposer, $$SalesTableOrderingComposer, $$SalesTableAnnotationComposer, $$SalesTableCreateCompanionBuilder, $$SalesTableUpdateCompanionBuilder, (Sale, BaseReferences<_$AppDatabase, $SalesTable, Sale>), Sale, PrefetchHooks Function() >; class $AppDatabaseManager { final _$AppDatabase _db; $AppDatabaseManager(this._db); $$VarietiesTableTableManager get varieties => $$VarietiesTableTableManager(_db, _db.varieties); $$VarietyVernacularNamesTableTableManager get varietyVernacularNames => $$VarietyVernacularNamesTableTableManager( _db, _db.varietyVernacularNames, ); $$SpeciesTableTableManager get species => $$SpeciesTableTableManager(_db, _db.species); $$SpeciesCommonNamesTableTableManager get speciesCommonNames => $$SpeciesCommonNamesTableTableManager(_db, _db.speciesCommonNames); $$LotsTableTableManager get lots => $$LotsTableTableManager(_db, _db.lots); $$GerminationTestsTableTableManager get germinationTests => $$GerminationTestsTableTableManager(_db, _db.germinationTests); $$ConditionChecksTableTableManager get conditionChecks => $$ConditionChecksTableTableManager(_db, _db.conditionChecks); $$MovementsTableTableManager get movements => $$MovementsTableTableManager(_db, _db.movements); $$PartiesTableTableManager get parties => $$PartiesTableTableManager(_db, _db.parties); $$AttachmentsTableTableManager get attachments => $$AttachmentsTableTableManager(_db, _db.attachments); $$ExternalLinksTableTableManager get externalLinks => $$ExternalLinksTableTableManager(_db, _db.externalLinks); $$PlantaresTableTableManager get plantares => $$PlantaresTableTableManager(_db, _db.plantares); $$SalesTableTableManager get sales => $$SalesTableTableManager(_db, _db.sales); }