// GENERATED CODE - DO NOT MODIFY BY HAND part of 'app_database.dart'; // ignore_for_file: type=lint class $TransactionsTable extends Transactions with TableInfo<$TransactionsTable, Transaction> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $TransactionsTable(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 _amountMeta = const VerificationMeta('amount'); @override late final GeneratedColumn amount = GeneratedColumn( 'amount', aliasedName, false, type: DriftSqlType.double, requiredDuringInsert: true, ); static const VerificationMeta _categoryMeta = const VerificationMeta( 'category', ); @override late final GeneratedColumn category = GeneratedColumn( 'category', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _typeMeta = const VerificationMeta('type'); @override late final GeneratedColumn type = GeneratedColumn( 'type', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _dateMeta = const VerificationMeta('date'); @override late final GeneratedColumn date = GeneratedColumn( 'date', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: true, ); static const VerificationMeta _noteMeta = const VerificationMeta('note'); @override late final GeneratedColumn note = GeneratedColumn( 'note', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _recurrenceMeta = const VerificationMeta( 'recurrence', ); @override late final GeneratedColumn recurrence = GeneratedColumn( 'recurrence', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: false, defaultValue: const Constant('none'), ); static const VerificationMeta _lastOccurrenceMeta = const VerificationMeta( 'lastOccurrence', ); @override late final GeneratedColumn lastOccurrence = GeneratedColumn( 'last_occurrence', aliasedName, true, type: DriftSqlType.dateTime, requiredDuringInsert: false, ); static const VerificationMeta _currencyMeta = const VerificationMeta( 'currency', ); @override late final GeneratedColumn currency = GeneratedColumn( 'currency', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: false, defaultValue: const Constant('\$'), ); static const VerificationMeta _currencyCodeMeta = const VerificationMeta( 'currencyCode', ); @override late final GeneratedColumn currencyCode = GeneratedColumn( 'currency_code', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: false, defaultValue: const Constant('USD'), ); static const VerificationMeta _accountIdMeta = const VerificationMeta( 'accountId', ); @override late final GeneratedColumn accountId = GeneratedColumn( 'account_id', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: false, defaultValue: const Constant(1), ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: currentDateAndTime, ); @override List get $columns => [ id, amount, category, type, date, note, recurrence, lastOccurrence, currency, currencyCode, accountId, createdAt, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'transactions'; @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('amount')) { context.handle( _amountMeta, amount.isAcceptableOrUnknown(data['amount']!, _amountMeta), ); } else if (isInserting) { context.missing(_amountMeta); } if (data.containsKey('category')) { context.handle( _categoryMeta, category.isAcceptableOrUnknown(data['category']!, _categoryMeta), ); } else if (isInserting) { context.missing(_categoryMeta); } if (data.containsKey('type')) { context.handle( _typeMeta, type.isAcceptableOrUnknown(data['type']!, _typeMeta), ); } else if (isInserting) { context.missing(_typeMeta); } if (data.containsKey('date')) { context.handle( _dateMeta, date.isAcceptableOrUnknown(data['date']!, _dateMeta), ); } else if (isInserting) { context.missing(_dateMeta); } if (data.containsKey('note')) { context.handle( _noteMeta, note.isAcceptableOrUnknown(data['note']!, _noteMeta), ); } if (data.containsKey('recurrence')) { context.handle( _recurrenceMeta, recurrence.isAcceptableOrUnknown(data['recurrence']!, _recurrenceMeta), ); } if (data.containsKey('last_occurrence')) { context.handle( _lastOccurrenceMeta, lastOccurrence.isAcceptableOrUnknown( data['last_occurrence']!, _lastOccurrenceMeta, ), ); } if (data.containsKey('currency')) { context.handle( _currencyMeta, currency.isAcceptableOrUnknown(data['currency']!, _currencyMeta), ); } if (data.containsKey('currency_code')) { context.handle( _currencyCodeMeta, currencyCode.isAcceptableOrUnknown( data['currency_code']!, _currencyCodeMeta, ), ); } if (data.containsKey('account_id')) { context.handle( _accountIdMeta, accountId.isAcceptableOrUnknown(data['account_id']!, _accountIdMeta), ); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Transaction map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Transaction( id: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}id'], )!, amount: attachedDatabase.typeMapping.read( DriftSqlType.double, data['${effectivePrefix}amount'], )!, category: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}category'], )!, type: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}type'], )!, date: attachedDatabase.typeMapping.read( DriftSqlType.dateTime, data['${effectivePrefix}date'], )!, note: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}note'], ), recurrence: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}recurrence'], )!, lastOccurrence: attachedDatabase.typeMapping.read( DriftSqlType.dateTime, data['${effectivePrefix}last_occurrence'], ), currency: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}currency'], )!, currencyCode: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}currency_code'], )!, accountId: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}account_id'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.dateTime, data['${effectivePrefix}created_at'], )!, ); } @override $TransactionsTable createAlias(String alias) { return $TransactionsTable(attachedDatabase, alias); } } class Transaction extends DataClass implements Insertable { final String id; final double amount; final String category; final String type; final DateTime date; final String? note; final String recurrence; final DateTime? lastOccurrence; final String currency; final String currencyCode; final int accountId; final DateTime createdAt; const Transaction({ required this.id, required this.amount, required this.category, required this.type, required this.date, this.note, required this.recurrence, this.lastOccurrence, required this.currency, required this.currencyCode, required this.accountId, required this.createdAt, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['amount'] = Variable(amount); map['category'] = Variable(category); map['type'] = Variable(type); map['date'] = Variable(date); if (!nullToAbsent || note != null) { map['note'] = Variable(note); } map['recurrence'] = Variable(recurrence); if (!nullToAbsent || lastOccurrence != null) { map['last_occurrence'] = Variable(lastOccurrence); } map['currency'] = Variable(currency); map['currency_code'] = Variable(currencyCode); map['account_id'] = Variable(accountId); map['created_at'] = Variable(createdAt); return map; } TransactionsCompanion toCompanion(bool nullToAbsent) { return TransactionsCompanion( id: Value(id), amount: Value(amount), category: Value(category), type: Value(type), date: Value(date), note: note == null && nullToAbsent ? const Value.absent() : Value(note), recurrence: Value(recurrence), lastOccurrence: lastOccurrence == null && nullToAbsent ? const Value.absent() : Value(lastOccurrence), currency: Value(currency), currencyCode: Value(currencyCode), accountId: Value(accountId), createdAt: Value(createdAt), ); } factory Transaction.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Transaction( id: serializer.fromJson(json['id']), amount: serializer.fromJson(json['amount']), category: serializer.fromJson(json['category']), type: serializer.fromJson(json['type']), date: serializer.fromJson(json['date']), note: serializer.fromJson(json['note']), recurrence: serializer.fromJson(json['recurrence']), lastOccurrence: serializer.fromJson(json['lastOccurrence']), currency: serializer.fromJson(json['currency']), currencyCode: serializer.fromJson(json['currencyCode']), accountId: serializer.fromJson(json['accountId']), createdAt: serializer.fromJson(json['createdAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'amount': serializer.toJson(amount), 'category': serializer.toJson(category), 'type': serializer.toJson(type), 'date': serializer.toJson(date), 'note': serializer.toJson(note), 'recurrence': serializer.toJson(recurrence), 'lastOccurrence': serializer.toJson(lastOccurrence), 'currency': serializer.toJson(currency), 'currencyCode': serializer.toJson(currencyCode), 'accountId': serializer.toJson(accountId), 'createdAt': serializer.toJson(createdAt), }; } Transaction copyWith({ String? id, double? amount, String? category, String? type, DateTime? date, Value note = const Value.absent(), String? recurrence, Value lastOccurrence = const Value.absent(), String? currency, String? currencyCode, int? accountId, DateTime? createdAt, }) => Transaction( id: id ?? this.id, amount: amount ?? this.amount, category: category ?? this.category, type: type ?? this.type, date: date ?? this.date, note: note.present ? note.value : this.note, recurrence: recurrence ?? this.recurrence, lastOccurrence: lastOccurrence.present ? lastOccurrence.value : this.lastOccurrence, currency: currency ?? this.currency, currencyCode: currencyCode ?? this.currencyCode, accountId: accountId ?? this.accountId, createdAt: createdAt ?? this.createdAt, ); Transaction copyWithCompanion(TransactionsCompanion data) { return Transaction( id: data.id.present ? data.id.value : this.id, amount: data.amount.present ? data.amount.value : this.amount, category: data.category.present ? data.category.value : this.category, type: data.type.present ? data.type.value : this.type, date: data.date.present ? data.date.value : this.date, note: data.note.present ? data.note.value : this.note, recurrence: data.recurrence.present ? data.recurrence.value : this.recurrence, lastOccurrence: data.lastOccurrence.present ? data.lastOccurrence.value : this.lastOccurrence, currency: data.currency.present ? data.currency.value : this.currency, currencyCode: data.currencyCode.present ? data.currencyCode.value : this.currencyCode, accountId: data.accountId.present ? data.accountId.value : this.accountId, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, ); } @override String toString() { return (StringBuffer('Transaction(') ..write('id: $id, ') ..write('amount: $amount, ') ..write('category: $category, ') ..write('type: $type, ') ..write('date: $date, ') ..write('note: $note, ') ..write('recurrence: $recurrence, ') ..write('lastOccurrence: $lastOccurrence, ') ..write('currency: $currency, ') ..write('currencyCode: $currencyCode, ') ..write('accountId: $accountId, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash( id, amount, category, type, date, note, recurrence, lastOccurrence, currency, currencyCode, accountId, createdAt, ); @override bool operator ==(Object other) => identical(this, other) || (other is Transaction && other.id == this.id && other.amount == this.amount && other.category == this.category && other.type == this.type && other.date == this.date && other.note == this.note && other.recurrence == this.recurrence && other.lastOccurrence == this.lastOccurrence && other.currency == this.currency && other.currencyCode == this.currencyCode && other.accountId == this.accountId && other.createdAt == this.createdAt); } class TransactionsCompanion extends UpdateCompanion { final Value id; final Value amount; final Value category; final Value type; final Value date; final Value note; final Value recurrence; final Value lastOccurrence; final Value currency; final Value currencyCode; final Value accountId; final Value createdAt; final Value rowid; const TransactionsCompanion({ this.id = const Value.absent(), this.amount = const Value.absent(), this.category = const Value.absent(), this.type = const Value.absent(), this.date = const Value.absent(), this.note = const Value.absent(), this.recurrence = const Value.absent(), this.lastOccurrence = const Value.absent(), this.currency = const Value.absent(), this.currencyCode = const Value.absent(), this.accountId = const Value.absent(), this.createdAt = const Value.absent(), this.rowid = const Value.absent(), }); TransactionsCompanion.insert({ required String id, required double amount, required String category, required String type, required DateTime date, this.note = const Value.absent(), this.recurrence = const Value.absent(), this.lastOccurrence = const Value.absent(), this.currency = const Value.absent(), this.currencyCode = const Value.absent(), this.accountId = const Value.absent(), this.createdAt = const Value.absent(), this.rowid = const Value.absent(), }) : id = Value(id), amount = Value(amount), category = Value(category), type = Value(type), date = Value(date); static Insertable custom({ Expression? id, Expression? amount, Expression? category, Expression? type, Expression? date, Expression? note, Expression? recurrence, Expression? lastOccurrence, Expression? currency, Expression? currencyCode, Expression? accountId, Expression? createdAt, Expression? rowid, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (amount != null) 'amount': amount, if (category != null) 'category': category, if (type != null) 'type': type, if (date != null) 'date': date, if (note != null) 'note': note, if (recurrence != null) 'recurrence': recurrence, if (lastOccurrence != null) 'last_occurrence': lastOccurrence, if (currency != null) 'currency': currency, if (currencyCode != null) 'currency_code': currencyCode, if (accountId != null) 'account_id': accountId, if (createdAt != null) 'created_at': createdAt, if (rowid != null) 'rowid': rowid, }); } TransactionsCompanion copyWith({ Value? id, Value? amount, Value? category, Value? type, Value? date, Value? note, Value? recurrence, Value? lastOccurrence, Value? currency, Value? currencyCode, Value? accountId, Value? createdAt, Value? rowid, }) { return TransactionsCompanion( id: id ?? this.id, amount: amount ?? this.amount, category: category ?? this.category, type: type ?? this.type, date: date ?? this.date, note: note ?? this.note, recurrence: recurrence ?? this.recurrence, lastOccurrence: lastOccurrence ?? this.lastOccurrence, currency: currency ?? this.currency, currencyCode: currencyCode ?? this.currencyCode, accountId: accountId ?? this.accountId, createdAt: createdAt ?? this.createdAt, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (amount.present) { map['amount'] = Variable(amount.value); } if (category.present) { map['category'] = Variable(category.value); } if (type.present) { map['type'] = Variable(type.value); } if (date.present) { map['date'] = Variable(date.value); } if (note.present) { map['note'] = Variable(note.value); } if (recurrence.present) { map['recurrence'] = Variable(recurrence.value); } if (lastOccurrence.present) { map['last_occurrence'] = Variable(lastOccurrence.value); } if (currency.present) { map['currency'] = Variable(currency.value); } if (currencyCode.present) { map['currency_code'] = Variable(currencyCode.value); } if (accountId.present) { map['account_id'] = Variable(accountId.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } if (rowid.present) { map['rowid'] = Variable(rowid.value); } return map; } @override String toString() { return (StringBuffer('TransactionsCompanion(') ..write('id: $id, ') ..write('amount: $amount, ') ..write('category: $category, ') ..write('type: $type, ') ..write('date: $date, ') ..write('note: $note, ') ..write('recurrence: $recurrence, ') ..write('lastOccurrence: $lastOccurrence, ') ..write('currency: $currency, ') ..write('currencyCode: $currencyCode, ') ..write('accountId: $accountId, ') ..write('createdAt: $createdAt, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } class $CategoriesTable extends Categories with TableInfo<$CategoriesTable, Category> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $CategoriesTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'PRIMARY KEY AUTOINCREMENT', ), ); static const VerificationMeta _nameMeta = const VerificationMeta('name'); @override late final GeneratedColumn name = GeneratedColumn( 'name', aliasedName, false, additionalChecks: GeneratedColumn.checkTextLength( minTextLength: 1, maxTextLength: 50, ), type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _typeMeta = const VerificationMeta('type'); @override late final GeneratedColumn type = GeneratedColumn( 'type', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _iconMeta = const VerificationMeta('icon'); @override late final GeneratedColumn icon = GeneratedColumn( 'icon', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _colorMeta = const VerificationMeta('color'); @override late final GeneratedColumn color = GeneratedColumn( 'color', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _isDefaultMeta = const VerificationMeta( 'isDefault', ); @override late final GeneratedColumn isDefault = GeneratedColumn( 'is_default', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_default" IN (0, 1))', ), defaultValue: const Constant(false), ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: currentDateAndTime, ); @override List get $columns => [ id, name, type, icon, color, isDefault, createdAt, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'categories'; @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)); } if (data.containsKey('name')) { context.handle( _nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta), ); } else if (isInserting) { context.missing(_nameMeta); } if (data.containsKey('type')) { context.handle( _typeMeta, type.isAcceptableOrUnknown(data['type']!, _typeMeta), ); } else if (isInserting) { context.missing(_typeMeta); } if (data.containsKey('icon')) { context.handle( _iconMeta, icon.isAcceptableOrUnknown(data['icon']!, _iconMeta), ); } if (data.containsKey('color')) { context.handle( _colorMeta, color.isAcceptableOrUnknown(data['color']!, _colorMeta), ); } if (data.containsKey('is_default')) { context.handle( _isDefaultMeta, isDefault.isAcceptableOrUnknown(data['is_default']!, _isDefaultMeta), ); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Category map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Category( id: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}id'], )!, name: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}name'], )!, type: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}type'], )!, icon: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}icon'], ), color: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}color'], ), isDefault: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_default'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.dateTime, data['${effectivePrefix}created_at'], )!, ); } @override $CategoriesTable createAlias(String alias) { return $CategoriesTable(attachedDatabase, alias); } } class Category extends DataClass implements Insertable { final int id; final String name; final String type; final String? icon; final String? color; final bool isDefault; final DateTime createdAt; const Category({ required this.id, required this.name, required this.type, this.icon, this.color, required this.isDefault, required this.createdAt, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['name'] = Variable(name); map['type'] = Variable(type); if (!nullToAbsent || icon != null) { map['icon'] = Variable(icon); } if (!nullToAbsent || color != null) { map['color'] = Variable(color); } map['is_default'] = Variable(isDefault); map['created_at'] = Variable(createdAt); return map; } CategoriesCompanion toCompanion(bool nullToAbsent) { return CategoriesCompanion( id: Value(id), name: Value(name), type: Value(type), icon: icon == null && nullToAbsent ? const Value.absent() : Value(icon), color: color == null && nullToAbsent ? const Value.absent() : Value(color), isDefault: Value(isDefault), createdAt: Value(createdAt), ); } factory Category.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Category( id: serializer.fromJson(json['id']), name: serializer.fromJson(json['name']), type: serializer.fromJson(json['type']), icon: serializer.fromJson(json['icon']), color: serializer.fromJson(json['color']), isDefault: serializer.fromJson(json['isDefault']), createdAt: serializer.fromJson(json['createdAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'name': serializer.toJson(name), 'type': serializer.toJson(type), 'icon': serializer.toJson(icon), 'color': serializer.toJson(color), 'isDefault': serializer.toJson(isDefault), 'createdAt': serializer.toJson(createdAt), }; } Category copyWith({ int? id, String? name, String? type, Value icon = const Value.absent(), Value color = const Value.absent(), bool? isDefault, DateTime? createdAt, }) => Category( id: id ?? this.id, name: name ?? this.name, type: type ?? this.type, icon: icon.present ? icon.value : this.icon, color: color.present ? color.value : this.color, isDefault: isDefault ?? this.isDefault, createdAt: createdAt ?? this.createdAt, ); Category copyWithCompanion(CategoriesCompanion data) { return Category( id: data.id.present ? data.id.value : this.id, name: data.name.present ? data.name.value : this.name, type: data.type.present ? data.type.value : this.type, icon: data.icon.present ? data.icon.value : this.icon, color: data.color.present ? data.color.value : this.color, isDefault: data.isDefault.present ? data.isDefault.value : this.isDefault, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, ); } @override String toString() { return (StringBuffer('Category(') ..write('id: $id, ') ..write('name: $name, ') ..write('type: $type, ') ..write('icon: $icon, ') ..write('color: $color, ') ..write('isDefault: $isDefault, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, name, type, icon, color, isDefault, createdAt); @override bool operator ==(Object other) => identical(this, other) || (other is Category && other.id == this.id && other.name == this.name && other.type == this.type && other.icon == this.icon && other.color == this.color && other.isDefault == this.isDefault && other.createdAt == this.createdAt); } class CategoriesCompanion extends UpdateCompanion { final Value id; final Value name; final Value type; final Value icon; final Value color; final Value isDefault; final Value createdAt; const CategoriesCompanion({ this.id = const Value.absent(), this.name = const Value.absent(), this.type = const Value.absent(), this.icon = const Value.absent(), this.color = const Value.absent(), this.isDefault = const Value.absent(), this.createdAt = const Value.absent(), }); CategoriesCompanion.insert({ this.id = const Value.absent(), required String name, required String type, this.icon = const Value.absent(), this.color = const Value.absent(), this.isDefault = const Value.absent(), this.createdAt = const Value.absent(), }) : name = Value(name), type = Value(type); static Insertable custom({ Expression? id, Expression? name, Expression? type, Expression? icon, Expression? color, Expression? isDefault, Expression? createdAt, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (name != null) 'name': name, if (type != null) 'type': type, if (icon != null) 'icon': icon, if (color != null) 'color': color, if (isDefault != null) 'is_default': isDefault, if (createdAt != null) 'created_at': createdAt, }); } CategoriesCompanion copyWith({ Value? id, Value? name, Value? type, Value? icon, Value? color, Value? isDefault, Value? createdAt, }) { return CategoriesCompanion( id: id ?? this.id, name: name ?? this.name, type: type ?? this.type, icon: icon ?? this.icon, color: color ?? this.color, isDefault: isDefault ?? this.isDefault, createdAt: createdAt ?? this.createdAt, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (name.present) { map['name'] = Variable(name.value); } if (type.present) { map['type'] = Variable(type.value); } if (icon.present) { map['icon'] = Variable(icon.value); } if (color.present) { map['color'] = Variable(color.value); } if (isDefault.present) { map['is_default'] = Variable(isDefault.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } return map; } @override String toString() { return (StringBuffer('CategoriesCompanion(') ..write('id: $id, ') ..write('name: $name, ') ..write('type: $type, ') ..write('icon: $icon, ') ..write('color: $color, ') ..write('isDefault: $isDefault, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } } class $BudgetsTable extends Budgets with TableInfo<$BudgetsTable, Budget> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $BudgetsTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'PRIMARY KEY AUTOINCREMENT', ), ); static const VerificationMeta _amountMeta = const VerificationMeta('amount'); @override late final GeneratedColumn amount = GeneratedColumn( 'amount', aliasedName, false, type: DriftSqlType.double, requiredDuringInsert: true, ); static const VerificationMeta _categoryIdMeta = const VerificationMeta( 'categoryId', ); @override late final GeneratedColumn categoryId = GeneratedColumn( 'category_id', aliasedName, true, type: DriftSqlType.string, requiredDuringInsert: false, ); static const VerificationMeta _monthMeta = const VerificationMeta('month'); @override late final GeneratedColumn month = GeneratedColumn( 'month', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _yearMeta = const VerificationMeta('year'); @override late final GeneratedColumn year = GeneratedColumn( 'year', aliasedName, false, type: DriftSqlType.int, requiredDuringInsert: true, ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: currentDateAndTime, ); @override List get $columns => [ id, amount, categoryId, month, year, createdAt, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'budgets'; @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)); } if (data.containsKey('amount')) { context.handle( _amountMeta, amount.isAcceptableOrUnknown(data['amount']!, _amountMeta), ); } else if (isInserting) { context.missing(_amountMeta); } if (data.containsKey('category_id')) { context.handle( _categoryIdMeta, categoryId.isAcceptableOrUnknown(data['category_id']!, _categoryIdMeta), ); } if (data.containsKey('month')) { context.handle( _monthMeta, month.isAcceptableOrUnknown(data['month']!, _monthMeta), ); } else if (isInserting) { context.missing(_monthMeta); } if (data.containsKey('year')) { context.handle( _yearMeta, year.isAcceptableOrUnknown(data['year']!, _yearMeta), ); } else if (isInserting) { context.missing(_yearMeta); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Budget map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Budget( id: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}id'], )!, amount: attachedDatabase.typeMapping.read( DriftSqlType.double, data['${effectivePrefix}amount'], )!, categoryId: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}category_id'], ), month: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}month'], )!, year: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}year'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.dateTime, data['${effectivePrefix}created_at'], )!, ); } @override $BudgetsTable createAlias(String alias) { return $BudgetsTable(attachedDatabase, alias); } } class Budget extends DataClass implements Insertable { final int id; final double amount; final String? categoryId; final int month; final int year; final DateTime createdAt; const Budget({ required this.id, required this.amount, this.categoryId, required this.month, required this.year, required this.createdAt, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['amount'] = Variable(amount); if (!nullToAbsent || categoryId != null) { map['category_id'] = Variable(categoryId); } map['month'] = Variable(month); map['year'] = Variable(year); map['created_at'] = Variable(createdAt); return map; } BudgetsCompanion toCompanion(bool nullToAbsent) { return BudgetsCompanion( id: Value(id), amount: Value(amount), categoryId: categoryId == null && nullToAbsent ? const Value.absent() : Value(categoryId), month: Value(month), year: Value(year), createdAt: Value(createdAt), ); } factory Budget.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Budget( id: serializer.fromJson(json['id']), amount: serializer.fromJson(json['amount']), categoryId: serializer.fromJson(json['categoryId']), month: serializer.fromJson(json['month']), year: serializer.fromJson(json['year']), createdAt: serializer.fromJson(json['createdAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'amount': serializer.toJson(amount), 'categoryId': serializer.toJson(categoryId), 'month': serializer.toJson(month), 'year': serializer.toJson(year), 'createdAt': serializer.toJson(createdAt), }; } Budget copyWith({ int? id, double? amount, Value categoryId = const Value.absent(), int? month, int? year, DateTime? createdAt, }) => Budget( id: id ?? this.id, amount: amount ?? this.amount, categoryId: categoryId.present ? categoryId.value : this.categoryId, month: month ?? this.month, year: year ?? this.year, createdAt: createdAt ?? this.createdAt, ); Budget copyWithCompanion(BudgetsCompanion data) { return Budget( id: data.id.present ? data.id.value : this.id, amount: data.amount.present ? data.amount.value : this.amount, categoryId: data.categoryId.present ? data.categoryId.value : this.categoryId, month: data.month.present ? data.month.value : this.month, year: data.year.present ? data.year.value : this.year, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, ); } @override String toString() { return (StringBuffer('Budget(') ..write('id: $id, ') ..write('amount: $amount, ') ..write('categoryId: $categoryId, ') ..write('month: $month, ') ..write('year: $year, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, amount, categoryId, month, year, createdAt); @override bool operator ==(Object other) => identical(this, other) || (other is Budget && other.id == this.id && other.amount == this.amount && other.categoryId == this.categoryId && other.month == this.month && other.year == this.year && other.createdAt == this.createdAt); } class BudgetsCompanion extends UpdateCompanion { final Value id; final Value amount; final Value categoryId; final Value month; final Value year; final Value createdAt; const BudgetsCompanion({ this.id = const Value.absent(), this.amount = const Value.absent(), this.categoryId = const Value.absent(), this.month = const Value.absent(), this.year = const Value.absent(), this.createdAt = const Value.absent(), }); BudgetsCompanion.insert({ this.id = const Value.absent(), required double amount, this.categoryId = const Value.absent(), required int month, required int year, this.createdAt = const Value.absent(), }) : amount = Value(amount), month = Value(month), year = Value(year); static Insertable custom({ Expression? id, Expression? amount, Expression? categoryId, Expression? month, Expression? year, Expression? createdAt, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (amount != null) 'amount': amount, if (categoryId != null) 'category_id': categoryId, if (month != null) 'month': month, if (year != null) 'year': year, if (createdAt != null) 'created_at': createdAt, }); } BudgetsCompanion copyWith({ Value? id, Value? amount, Value? categoryId, Value? month, Value? year, Value? createdAt, }) { return BudgetsCompanion( id: id ?? this.id, amount: amount ?? this.amount, categoryId: categoryId ?? this.categoryId, month: month ?? this.month, year: year ?? this.year, createdAt: createdAt ?? this.createdAt, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (amount.present) { map['amount'] = Variable(amount.value); } if (categoryId.present) { map['category_id'] = Variable(categoryId.value); } if (month.present) { map['month'] = Variable(month.value); } if (year.present) { map['year'] = Variable(year.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } return map; } @override String toString() { return (StringBuffer('BudgetsCompanion(') ..write('id: $id, ') ..write('amount: $amount, ') ..write('categoryId: $categoryId, ') ..write('month: $month, ') ..write('year: $year, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } } class $ExchangeRatesTable extends ExchangeRates with TableInfo<$ExchangeRatesTable, ExchangeRate> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $ExchangeRatesTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'PRIMARY KEY AUTOINCREMENT', ), ); static const VerificationMeta _fromCurrencyMeta = const VerificationMeta( 'fromCurrency', ); @override late final GeneratedColumn fromCurrency = GeneratedColumn( 'from_currency', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _toCurrencyMeta = const VerificationMeta( 'toCurrency', ); @override late final GeneratedColumn toCurrency = GeneratedColumn( 'to_currency', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _rateMeta = const VerificationMeta('rate'); @override late final GeneratedColumn rate = GeneratedColumn( 'rate', aliasedName, false, type: DriftSqlType.double, requiredDuringInsert: true, ); static const VerificationMeta _updatedAtMeta = const VerificationMeta( 'updatedAt', ); @override late final GeneratedColumn updatedAt = GeneratedColumn( 'updated_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: currentDateAndTime, ); @override List get $columns => [ id, fromCurrency, toCurrency, rate, updatedAt, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'exchange_rates'; @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)); } if (data.containsKey('from_currency')) { context.handle( _fromCurrencyMeta, fromCurrency.isAcceptableOrUnknown( data['from_currency']!, _fromCurrencyMeta, ), ); } else if (isInserting) { context.missing(_fromCurrencyMeta); } if (data.containsKey('to_currency')) { context.handle( _toCurrencyMeta, toCurrency.isAcceptableOrUnknown(data['to_currency']!, _toCurrencyMeta), ); } else if (isInserting) { context.missing(_toCurrencyMeta); } if (data.containsKey('rate')) { context.handle( _rateMeta, rate.isAcceptableOrUnknown(data['rate']!, _rateMeta), ); } else if (isInserting) { context.missing(_rateMeta); } if (data.containsKey('updated_at')) { context.handle( _updatedAtMeta, updatedAt.isAcceptableOrUnknown(data['updated_at']!, _updatedAtMeta), ); } return context; } @override Set get $primaryKey => {id}; @override ExchangeRate map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return ExchangeRate( id: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}id'], )!, fromCurrency: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}from_currency'], )!, toCurrency: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}to_currency'], )!, rate: attachedDatabase.typeMapping.read( DriftSqlType.double, data['${effectivePrefix}rate'], )!, updatedAt: attachedDatabase.typeMapping.read( DriftSqlType.dateTime, data['${effectivePrefix}updated_at'], )!, ); } @override $ExchangeRatesTable createAlias(String alias) { return $ExchangeRatesTable(attachedDatabase, alias); } } class ExchangeRate extends DataClass implements Insertable { final int id; final String fromCurrency; final String toCurrency; final double rate; final DateTime updatedAt; const ExchangeRate({ required this.id, required this.fromCurrency, required this.toCurrency, required this.rate, required this.updatedAt, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['from_currency'] = Variable(fromCurrency); map['to_currency'] = Variable(toCurrency); map['rate'] = Variable(rate); map['updated_at'] = Variable(updatedAt); return map; } ExchangeRatesCompanion toCompanion(bool nullToAbsent) { return ExchangeRatesCompanion( id: Value(id), fromCurrency: Value(fromCurrency), toCurrency: Value(toCurrency), rate: Value(rate), updatedAt: Value(updatedAt), ); } factory ExchangeRate.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return ExchangeRate( id: serializer.fromJson(json['id']), fromCurrency: serializer.fromJson(json['fromCurrency']), toCurrency: serializer.fromJson(json['toCurrency']), rate: serializer.fromJson(json['rate']), updatedAt: serializer.fromJson(json['updatedAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'fromCurrency': serializer.toJson(fromCurrency), 'toCurrency': serializer.toJson(toCurrency), 'rate': serializer.toJson(rate), 'updatedAt': serializer.toJson(updatedAt), }; } ExchangeRate copyWith({ int? id, String? fromCurrency, String? toCurrency, double? rate, DateTime? updatedAt, }) => ExchangeRate( id: id ?? this.id, fromCurrency: fromCurrency ?? this.fromCurrency, toCurrency: toCurrency ?? this.toCurrency, rate: rate ?? this.rate, updatedAt: updatedAt ?? this.updatedAt, ); ExchangeRate copyWithCompanion(ExchangeRatesCompanion data) { return ExchangeRate( id: data.id.present ? data.id.value : this.id, fromCurrency: data.fromCurrency.present ? data.fromCurrency.value : this.fromCurrency, toCurrency: data.toCurrency.present ? data.toCurrency.value : this.toCurrency, rate: data.rate.present ? data.rate.value : this.rate, updatedAt: data.updatedAt.present ? data.updatedAt.value : this.updatedAt, ); } @override String toString() { return (StringBuffer('ExchangeRate(') ..write('id: $id, ') ..write('fromCurrency: $fromCurrency, ') ..write('toCurrency: $toCurrency, ') ..write('rate: $rate, ') ..write('updatedAt: $updatedAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, fromCurrency, toCurrency, rate, updatedAt); @override bool operator ==(Object other) => identical(this, other) || (other is ExchangeRate && other.id == this.id && other.fromCurrency == this.fromCurrency && other.toCurrency == this.toCurrency && other.rate == this.rate && other.updatedAt == this.updatedAt); } class ExchangeRatesCompanion extends UpdateCompanion { final Value id; final Value fromCurrency; final Value toCurrency; final Value rate; final Value updatedAt; const ExchangeRatesCompanion({ this.id = const Value.absent(), this.fromCurrency = const Value.absent(), this.toCurrency = const Value.absent(), this.rate = const Value.absent(), this.updatedAt = const Value.absent(), }); ExchangeRatesCompanion.insert({ this.id = const Value.absent(), required String fromCurrency, required String toCurrency, required double rate, this.updatedAt = const Value.absent(), }) : fromCurrency = Value(fromCurrency), toCurrency = Value(toCurrency), rate = Value(rate); static Insertable custom({ Expression? id, Expression? fromCurrency, Expression? toCurrency, Expression? rate, Expression? updatedAt, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (fromCurrency != null) 'from_currency': fromCurrency, if (toCurrency != null) 'to_currency': toCurrency, if (rate != null) 'rate': rate, if (updatedAt != null) 'updated_at': updatedAt, }); } ExchangeRatesCompanion copyWith({ Value? id, Value? fromCurrency, Value? toCurrency, Value? rate, Value? updatedAt, }) { return ExchangeRatesCompanion( id: id ?? this.id, fromCurrency: fromCurrency ?? this.fromCurrency, toCurrency: toCurrency ?? this.toCurrency, rate: rate ?? this.rate, updatedAt: updatedAt ?? this.updatedAt, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (fromCurrency.present) { map['from_currency'] = Variable(fromCurrency.value); } if (toCurrency.present) { map['to_currency'] = Variable(toCurrency.value); } if (rate.present) { map['rate'] = Variable(rate.value); } if (updatedAt.present) { map['updated_at'] = Variable(updatedAt.value); } return map; } @override String toString() { return (StringBuffer('ExchangeRatesCompanion(') ..write('id: $id, ') ..write('fromCurrency: $fromCurrency, ') ..write('toCurrency: $toCurrency, ') ..write('rate: $rate, ') ..write('updatedAt: $updatedAt') ..write(')')) .toString(); } } class $AccountsTable extends Accounts with TableInfo<$AccountsTable, Account> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $AccountsTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( 'id', aliasedName, false, hasAutoIncrement: true, type: DriftSqlType.int, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'PRIMARY KEY AUTOINCREMENT', ), ); static const VerificationMeta _nameMeta = const VerificationMeta('name'); @override late final GeneratedColumn name = GeneratedColumn( 'name', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true, ); static const VerificationMeta _isMainMeta = const VerificationMeta('isMain'); @override late final GeneratedColumn isMain = GeneratedColumn( 'is_main', aliasedName, false, type: DriftSqlType.bool, requiredDuringInsert: false, defaultConstraints: GeneratedColumn.constraintIsAlways( 'CHECK ("is_main" IN (0, 1))', ), defaultValue: const Constant(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), ); static const VerificationMeta _currencyMeta = const VerificationMeta( 'currency', ); @override late final GeneratedColumn currency = GeneratedColumn( 'currency', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: false, defaultValue: const Constant('USD'), ); static const VerificationMeta _createdAtMeta = const VerificationMeta( 'createdAt', ); @override late final GeneratedColumn createdAt = GeneratedColumn( 'created_at', aliasedName, false, type: DriftSqlType.dateTime, requiredDuringInsert: false, defaultValue: currentDateAndTime, ); @override List get $columns => [ id, name, isMain, sortOrder, currency, createdAt, ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'accounts'; @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)); } if (data.containsKey('name')) { context.handle( _nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta), ); } else if (isInserting) { context.missing(_nameMeta); } if (data.containsKey('is_main')) { context.handle( _isMainMeta, isMain.isAcceptableOrUnknown(data['is_main']!, _isMainMeta), ); } if (data.containsKey('sort_order')) { context.handle( _sortOrderMeta, sortOrder.isAcceptableOrUnknown(data['sort_order']!, _sortOrderMeta), ); } if (data.containsKey('currency')) { context.handle( _currencyMeta, currency.isAcceptableOrUnknown(data['currency']!, _currencyMeta), ); } if (data.containsKey('created_at')) { context.handle( _createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta), ); } return context; } @override Set get $primaryKey => {id}; @override Account map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return Account( id: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}id'], )!, name: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}name'], )!, isMain: attachedDatabase.typeMapping.read( DriftSqlType.bool, data['${effectivePrefix}is_main'], )!, sortOrder: attachedDatabase.typeMapping.read( DriftSqlType.int, data['${effectivePrefix}sort_order'], )!, currency: attachedDatabase.typeMapping.read( DriftSqlType.string, data['${effectivePrefix}currency'], )!, createdAt: attachedDatabase.typeMapping.read( DriftSqlType.dateTime, data['${effectivePrefix}created_at'], )!, ); } @override $AccountsTable createAlias(String alias) { return $AccountsTable(attachedDatabase, alias); } } class Account extends DataClass implements Insertable { final int id; final String name; final bool isMain; final int sortOrder; final String currency; final DateTime createdAt; const Account({ required this.id, required this.name, required this.isMain, required this.sortOrder, required this.currency, required this.createdAt, }); @override Map toColumns(bool nullToAbsent) { final map = {}; map['id'] = Variable(id); map['name'] = Variable(name); map['is_main'] = Variable(isMain); map['sort_order'] = Variable(sortOrder); map['currency'] = Variable(currency); map['created_at'] = Variable(createdAt); return map; } AccountsCompanion toCompanion(bool nullToAbsent) { return AccountsCompanion( id: Value(id), name: Value(name), isMain: Value(isMain), sortOrder: Value(sortOrder), currency: Value(currency), createdAt: Value(createdAt), ); } factory Account.fromJson( Map json, { ValueSerializer? serializer, }) { serializer ??= driftRuntimeOptions.defaultSerializer; return Account( id: serializer.fromJson(json['id']), name: serializer.fromJson(json['name']), isMain: serializer.fromJson(json['isMain']), sortOrder: serializer.fromJson(json['sortOrder']), currency: serializer.fromJson(json['currency']), createdAt: serializer.fromJson(json['createdAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'id': serializer.toJson(id), 'name': serializer.toJson(name), 'isMain': serializer.toJson(isMain), 'sortOrder': serializer.toJson(sortOrder), 'currency': serializer.toJson(currency), 'createdAt': serializer.toJson(createdAt), }; } Account copyWith({ int? id, String? name, bool? isMain, int? sortOrder, String? currency, DateTime? createdAt, }) => Account( id: id ?? this.id, name: name ?? this.name, isMain: isMain ?? this.isMain, sortOrder: sortOrder ?? this.sortOrder, currency: currency ?? this.currency, createdAt: createdAt ?? this.createdAt, ); Account copyWithCompanion(AccountsCompanion data) { return Account( id: data.id.present ? data.id.value : this.id, name: data.name.present ? data.name.value : this.name, isMain: data.isMain.present ? data.isMain.value : this.isMain, sortOrder: data.sortOrder.present ? data.sortOrder.value : this.sortOrder, currency: data.currency.present ? data.currency.value : this.currency, createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt, ); } @override String toString() { return (StringBuffer('Account(') ..write('id: $id, ') ..write('name: $name, ') ..write('isMain: $isMain, ') ..write('sortOrder: $sortOrder, ') ..write('currency: $currency, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash(id, name, isMain, sortOrder, currency, createdAt); @override bool operator ==(Object other) => identical(this, other) || (other is Account && other.id == this.id && other.name == this.name && other.isMain == this.isMain && other.sortOrder == this.sortOrder && other.currency == this.currency && other.createdAt == this.createdAt); } class AccountsCompanion extends UpdateCompanion { final Value id; final Value name; final Value isMain; final Value sortOrder; final Value currency; final Value createdAt; const AccountsCompanion({ this.id = const Value.absent(), this.name = const Value.absent(), this.isMain = const Value.absent(), this.sortOrder = const Value.absent(), this.currency = const Value.absent(), this.createdAt = const Value.absent(), }); AccountsCompanion.insert({ this.id = const Value.absent(), required String name, this.isMain = const Value.absent(), this.sortOrder = const Value.absent(), this.currency = const Value.absent(), this.createdAt = const Value.absent(), }) : name = Value(name); static Insertable custom({ Expression? id, Expression? name, Expression? isMain, Expression? sortOrder, Expression? currency, Expression? createdAt, }) { return RawValuesInsertable({ if (id != null) 'id': id, if (name != null) 'name': name, if (isMain != null) 'is_main': isMain, if (sortOrder != null) 'sort_order': sortOrder, if (currency != null) 'currency': currency, if (createdAt != null) 'created_at': createdAt, }); } AccountsCompanion copyWith({ Value? id, Value? name, Value? isMain, Value? sortOrder, Value? currency, Value? createdAt, }) { return AccountsCompanion( id: id ?? this.id, name: name ?? this.name, isMain: isMain ?? this.isMain, sortOrder: sortOrder ?? this.sortOrder, currency: currency ?? this.currency, createdAt: createdAt ?? this.createdAt, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (id.present) { map['id'] = Variable(id.value); } if (name.present) { map['name'] = Variable(name.value); } if (isMain.present) { map['is_main'] = Variable(isMain.value); } if (sortOrder.present) { map['sort_order'] = Variable(sortOrder.value); } if (currency.present) { map['currency'] = Variable(currency.value); } if (createdAt.present) { map['created_at'] = Variable(createdAt.value); } return map; } @override String toString() { return (StringBuffer('AccountsCompanion(') ..write('id: $id, ') ..write('name: $name, ') ..write('isMain: $isMain, ') ..write('sortOrder: $sortOrder, ') ..write('currency: $currency, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } } abstract class _$AppDatabase extends GeneratedDatabase { _$AppDatabase(QueryExecutor e) : super(e); $AppDatabaseManager get managers => $AppDatabaseManager(this); late final $TransactionsTable transactions = $TransactionsTable(this); late final $CategoriesTable categories = $CategoriesTable(this); late final $BudgetsTable budgets = $BudgetsTable(this); late final $ExchangeRatesTable exchangeRates = $ExchangeRatesTable(this); late final $AccountsTable accounts = $AccountsTable(this); @override Iterable> get allTables => allSchemaEntities.whereType>(); @override List get allSchemaEntities => [ transactions, categories, budgets, exchangeRates, accounts, ]; @override DriftDatabaseOptions get options => const DriftDatabaseOptions(storeDateTimeAsText: true); } typedef $$TransactionsTableCreateCompanionBuilder = TransactionsCompanion Function({ required String id, required double amount, required String category, required String type, required DateTime date, Value note, Value recurrence, Value lastOccurrence, Value currency, Value currencyCode, Value accountId, Value createdAt, Value rowid, }); typedef $$TransactionsTableUpdateCompanionBuilder = TransactionsCompanion Function({ Value id, Value amount, Value category, Value type, Value date, Value note, Value recurrence, Value lastOccurrence, Value currency, Value currencyCode, Value accountId, Value createdAt, Value rowid, }); class $$TransactionsTableFilterComposer extends Composer<_$AppDatabase, $TransactionsTable> { $$TransactionsTableFilterComposer({ 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 amount => $composableBuilder( column: $table.amount, builder: (column) => ColumnFilters(column), ); ColumnFilters get category => $composableBuilder( column: $table.category, builder: (column) => ColumnFilters(column), ); ColumnFilters get type => $composableBuilder( column: $table.type, builder: (column) => ColumnFilters(column), ); ColumnFilters get date => $composableBuilder( column: $table.date, builder: (column) => ColumnFilters(column), ); ColumnFilters get note => $composableBuilder( column: $table.note, builder: (column) => ColumnFilters(column), ); ColumnFilters get recurrence => $composableBuilder( column: $table.recurrence, builder: (column) => ColumnFilters(column), ); ColumnFilters get lastOccurrence => $composableBuilder( column: $table.lastOccurrence, builder: (column) => ColumnFilters(column), ); ColumnFilters get currency => $composableBuilder( column: $table.currency, builder: (column) => ColumnFilters(column), ); ColumnFilters get currencyCode => $composableBuilder( column: $table.currencyCode, builder: (column) => ColumnFilters(column), ); ColumnFilters get accountId => $composableBuilder( column: $table.accountId, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); } class $$TransactionsTableOrderingComposer extends Composer<_$AppDatabase, $TransactionsTable> { $$TransactionsTableOrderingComposer({ 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 amount => $composableBuilder( column: $table.amount, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get category => $composableBuilder( column: $table.category, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get type => $composableBuilder( column: $table.type, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get date => $composableBuilder( column: $table.date, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get note => $composableBuilder( column: $table.note, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get recurrence => $composableBuilder( column: $table.recurrence, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get lastOccurrence => $composableBuilder( column: $table.lastOccurrence, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get currency => $composableBuilder( column: $table.currency, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get currencyCode => $composableBuilder( column: $table.currencyCode, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get accountId => $composableBuilder( column: $table.accountId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); } class $$TransactionsTableAnnotationComposer extends Composer<_$AppDatabase, $TransactionsTable> { $$TransactionsTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get amount => $composableBuilder(column: $table.amount, builder: (column) => column); GeneratedColumn get category => $composableBuilder(column: $table.category, builder: (column) => column); GeneratedColumn get type => $composableBuilder(column: $table.type, builder: (column) => column); GeneratedColumn get date => $composableBuilder(column: $table.date, builder: (column) => column); GeneratedColumn get note => $composableBuilder(column: $table.note, builder: (column) => column); GeneratedColumn get recurrence => $composableBuilder( column: $table.recurrence, builder: (column) => column, ); GeneratedColumn get lastOccurrence => $composableBuilder( column: $table.lastOccurrence, builder: (column) => column, ); GeneratedColumn get currency => $composableBuilder(column: $table.currency, builder: (column) => column); GeneratedColumn get currencyCode => $composableBuilder( column: $table.currencyCode, builder: (column) => column, ); GeneratedColumn get accountId => $composableBuilder(column: $table.accountId, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); } class $$TransactionsTableTableManager extends RootTableManager< _$AppDatabase, $TransactionsTable, Transaction, $$TransactionsTableFilterComposer, $$TransactionsTableOrderingComposer, $$TransactionsTableAnnotationComposer, $$TransactionsTableCreateCompanionBuilder, $$TransactionsTableUpdateCompanionBuilder, ( Transaction, BaseReferences<_$AppDatabase, $TransactionsTable, Transaction>, ), Transaction, PrefetchHooks Function() > { $$TransactionsTableTableManager(_$AppDatabase db, $TransactionsTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$TransactionsTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$TransactionsTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$TransactionsTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value amount = const Value.absent(), Value category = const Value.absent(), Value type = const Value.absent(), Value date = const Value.absent(), Value note = const Value.absent(), Value recurrence = const Value.absent(), Value lastOccurrence = const Value.absent(), Value currency = const Value.absent(), Value currencyCode = const Value.absent(), Value accountId = const Value.absent(), Value createdAt = const Value.absent(), Value rowid = const Value.absent(), }) => TransactionsCompanion( id: id, amount: amount, category: category, type: type, date: date, note: note, recurrence: recurrence, lastOccurrence: lastOccurrence, currency: currency, currencyCode: currencyCode, accountId: accountId, createdAt: createdAt, rowid: rowid, ), createCompanionCallback: ({ required String id, required double amount, required String category, required String type, required DateTime date, Value note = const Value.absent(), Value recurrence = const Value.absent(), Value lastOccurrence = const Value.absent(), Value currency = const Value.absent(), Value currencyCode = const Value.absent(), Value accountId = const Value.absent(), Value createdAt = const Value.absent(), Value rowid = const Value.absent(), }) => TransactionsCompanion.insert( id: id, amount: amount, category: category, type: type, date: date, note: note, recurrence: recurrence, lastOccurrence: lastOccurrence, currency: currency, currencyCode: currencyCode, accountId: accountId, createdAt: createdAt, rowid: rowid, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$TransactionsTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $TransactionsTable, Transaction, $$TransactionsTableFilterComposer, $$TransactionsTableOrderingComposer, $$TransactionsTableAnnotationComposer, $$TransactionsTableCreateCompanionBuilder, $$TransactionsTableUpdateCompanionBuilder, ( Transaction, BaseReferences<_$AppDatabase, $TransactionsTable, Transaction>, ), Transaction, PrefetchHooks Function() >; typedef $$CategoriesTableCreateCompanionBuilder = CategoriesCompanion Function({ Value id, required String name, required String type, Value icon, Value color, Value isDefault, Value createdAt, }); typedef $$CategoriesTableUpdateCompanionBuilder = CategoriesCompanion Function({ Value id, Value name, Value type, Value icon, Value color, Value isDefault, Value createdAt, }); class $$CategoriesTableFilterComposer extends Composer<_$AppDatabase, $CategoriesTable> { $$CategoriesTableFilterComposer({ 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 name => $composableBuilder( column: $table.name, builder: (column) => ColumnFilters(column), ); ColumnFilters get type => $composableBuilder( column: $table.type, builder: (column) => ColumnFilters(column), ); ColumnFilters get icon => $composableBuilder( column: $table.icon, builder: (column) => ColumnFilters(column), ); ColumnFilters get color => $composableBuilder( column: $table.color, builder: (column) => ColumnFilters(column), ); ColumnFilters get isDefault => $composableBuilder( column: $table.isDefault, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); } class $$CategoriesTableOrderingComposer extends Composer<_$AppDatabase, $CategoriesTable> { $$CategoriesTableOrderingComposer({ 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 name => $composableBuilder( column: $table.name, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get type => $composableBuilder( column: $table.type, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get icon => $composableBuilder( column: $table.icon, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get color => $composableBuilder( column: $table.color, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isDefault => $composableBuilder( column: $table.isDefault, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); } class $$CategoriesTableAnnotationComposer extends Composer<_$AppDatabase, $CategoriesTable> { $$CategoriesTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get name => $composableBuilder(column: $table.name, builder: (column) => column); GeneratedColumn get type => $composableBuilder(column: $table.type, builder: (column) => column); GeneratedColumn get icon => $composableBuilder(column: $table.icon, builder: (column) => column); GeneratedColumn get color => $composableBuilder(column: $table.color, builder: (column) => column); GeneratedColumn get isDefault => $composableBuilder(column: $table.isDefault, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); } class $$CategoriesTableTableManager extends RootTableManager< _$AppDatabase, $CategoriesTable, Category, $$CategoriesTableFilterComposer, $$CategoriesTableOrderingComposer, $$CategoriesTableAnnotationComposer, $$CategoriesTableCreateCompanionBuilder, $$CategoriesTableUpdateCompanionBuilder, (Category, BaseReferences<_$AppDatabase, $CategoriesTable, Category>), Category, PrefetchHooks Function() > { $$CategoriesTableTableManager(_$AppDatabase db, $CategoriesTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$CategoriesTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$CategoriesTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$CategoriesTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value name = const Value.absent(), Value type = const Value.absent(), Value icon = const Value.absent(), Value color = const Value.absent(), Value isDefault = const Value.absent(), Value createdAt = const Value.absent(), }) => CategoriesCompanion( id: id, name: name, type: type, icon: icon, color: color, isDefault: isDefault, createdAt: createdAt, ), createCompanionCallback: ({ Value id = const Value.absent(), required String name, required String type, Value icon = const Value.absent(), Value color = const Value.absent(), Value isDefault = const Value.absent(), Value createdAt = const Value.absent(), }) => CategoriesCompanion.insert( id: id, name: name, type: type, icon: icon, color: color, isDefault: isDefault, createdAt: createdAt, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$CategoriesTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $CategoriesTable, Category, $$CategoriesTableFilterComposer, $$CategoriesTableOrderingComposer, $$CategoriesTableAnnotationComposer, $$CategoriesTableCreateCompanionBuilder, $$CategoriesTableUpdateCompanionBuilder, (Category, BaseReferences<_$AppDatabase, $CategoriesTable, Category>), Category, PrefetchHooks Function() >; typedef $$BudgetsTableCreateCompanionBuilder = BudgetsCompanion Function({ Value id, required double amount, Value categoryId, required int month, required int year, Value createdAt, }); typedef $$BudgetsTableUpdateCompanionBuilder = BudgetsCompanion Function({ Value id, Value amount, Value categoryId, Value month, Value year, Value createdAt, }); class $$BudgetsTableFilterComposer extends Composer<_$AppDatabase, $BudgetsTable> { $$BudgetsTableFilterComposer({ 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 amount => $composableBuilder( column: $table.amount, builder: (column) => ColumnFilters(column), ); ColumnFilters get categoryId => $composableBuilder( column: $table.categoryId, builder: (column) => ColumnFilters(column), ); ColumnFilters get month => $composableBuilder( column: $table.month, builder: (column) => ColumnFilters(column), ); ColumnFilters get year => $composableBuilder( column: $table.year, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); } class $$BudgetsTableOrderingComposer extends Composer<_$AppDatabase, $BudgetsTable> { $$BudgetsTableOrderingComposer({ 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 amount => $composableBuilder( column: $table.amount, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get categoryId => $composableBuilder( column: $table.categoryId, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get month => $composableBuilder( column: $table.month, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get year => $composableBuilder( column: $table.year, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); } class $$BudgetsTableAnnotationComposer extends Composer<_$AppDatabase, $BudgetsTable> { $$BudgetsTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get amount => $composableBuilder(column: $table.amount, builder: (column) => column); GeneratedColumn get categoryId => $composableBuilder( column: $table.categoryId, builder: (column) => column, ); GeneratedColumn get month => $composableBuilder(column: $table.month, builder: (column) => column); GeneratedColumn get year => $composableBuilder(column: $table.year, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); } class $$BudgetsTableTableManager extends RootTableManager< _$AppDatabase, $BudgetsTable, Budget, $$BudgetsTableFilterComposer, $$BudgetsTableOrderingComposer, $$BudgetsTableAnnotationComposer, $$BudgetsTableCreateCompanionBuilder, $$BudgetsTableUpdateCompanionBuilder, (Budget, BaseReferences<_$AppDatabase, $BudgetsTable, Budget>), Budget, PrefetchHooks Function() > { $$BudgetsTableTableManager(_$AppDatabase db, $BudgetsTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$BudgetsTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$BudgetsTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$BudgetsTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value amount = const Value.absent(), Value categoryId = const Value.absent(), Value month = const Value.absent(), Value year = const Value.absent(), Value createdAt = const Value.absent(), }) => BudgetsCompanion( id: id, amount: amount, categoryId: categoryId, month: month, year: year, createdAt: createdAt, ), createCompanionCallback: ({ Value id = const Value.absent(), required double amount, Value categoryId = const Value.absent(), required int month, required int year, Value createdAt = const Value.absent(), }) => BudgetsCompanion.insert( id: id, amount: amount, categoryId: categoryId, month: month, year: year, createdAt: createdAt, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$BudgetsTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $BudgetsTable, Budget, $$BudgetsTableFilterComposer, $$BudgetsTableOrderingComposer, $$BudgetsTableAnnotationComposer, $$BudgetsTableCreateCompanionBuilder, $$BudgetsTableUpdateCompanionBuilder, (Budget, BaseReferences<_$AppDatabase, $BudgetsTable, Budget>), Budget, PrefetchHooks Function() >; typedef $$ExchangeRatesTableCreateCompanionBuilder = ExchangeRatesCompanion Function({ Value id, required String fromCurrency, required String toCurrency, required double rate, Value updatedAt, }); typedef $$ExchangeRatesTableUpdateCompanionBuilder = ExchangeRatesCompanion Function({ Value id, Value fromCurrency, Value toCurrency, Value rate, Value updatedAt, }); class $$ExchangeRatesTableFilterComposer extends Composer<_$AppDatabase, $ExchangeRatesTable> { $$ExchangeRatesTableFilterComposer({ 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 fromCurrency => $composableBuilder( column: $table.fromCurrency, builder: (column) => ColumnFilters(column), ); ColumnFilters get toCurrency => $composableBuilder( column: $table.toCurrency, builder: (column) => ColumnFilters(column), ); ColumnFilters get rate => $composableBuilder( column: $table.rate, builder: (column) => ColumnFilters(column), ); ColumnFilters get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnFilters(column), ); } class $$ExchangeRatesTableOrderingComposer extends Composer<_$AppDatabase, $ExchangeRatesTable> { $$ExchangeRatesTableOrderingComposer({ 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 fromCurrency => $composableBuilder( column: $table.fromCurrency, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get toCurrency => $composableBuilder( column: $table.toCurrency, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get rate => $composableBuilder( column: $table.rate, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get updatedAt => $composableBuilder( column: $table.updatedAt, builder: (column) => ColumnOrderings(column), ); } class $$ExchangeRatesTableAnnotationComposer extends Composer<_$AppDatabase, $ExchangeRatesTable> { $$ExchangeRatesTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get fromCurrency => $composableBuilder( column: $table.fromCurrency, builder: (column) => column, ); GeneratedColumn get toCurrency => $composableBuilder( column: $table.toCurrency, builder: (column) => column, ); GeneratedColumn get rate => $composableBuilder(column: $table.rate, builder: (column) => column); GeneratedColumn get updatedAt => $composableBuilder(column: $table.updatedAt, builder: (column) => column); } class $$ExchangeRatesTableTableManager extends RootTableManager< _$AppDatabase, $ExchangeRatesTable, ExchangeRate, $$ExchangeRatesTableFilterComposer, $$ExchangeRatesTableOrderingComposer, $$ExchangeRatesTableAnnotationComposer, $$ExchangeRatesTableCreateCompanionBuilder, $$ExchangeRatesTableUpdateCompanionBuilder, ( ExchangeRate, BaseReferences<_$AppDatabase, $ExchangeRatesTable, ExchangeRate>, ), ExchangeRate, PrefetchHooks Function() > { $$ExchangeRatesTableTableManager(_$AppDatabase db, $ExchangeRatesTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$ExchangeRatesTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$ExchangeRatesTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$ExchangeRatesTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value fromCurrency = const Value.absent(), Value toCurrency = const Value.absent(), Value rate = const Value.absent(), Value updatedAt = const Value.absent(), }) => ExchangeRatesCompanion( id: id, fromCurrency: fromCurrency, toCurrency: toCurrency, rate: rate, updatedAt: updatedAt, ), createCompanionCallback: ({ Value id = const Value.absent(), required String fromCurrency, required String toCurrency, required double rate, Value updatedAt = const Value.absent(), }) => ExchangeRatesCompanion.insert( id: id, fromCurrency: fromCurrency, toCurrency: toCurrency, rate: rate, updatedAt: updatedAt, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$ExchangeRatesTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $ExchangeRatesTable, ExchangeRate, $$ExchangeRatesTableFilterComposer, $$ExchangeRatesTableOrderingComposer, $$ExchangeRatesTableAnnotationComposer, $$ExchangeRatesTableCreateCompanionBuilder, $$ExchangeRatesTableUpdateCompanionBuilder, ( ExchangeRate, BaseReferences<_$AppDatabase, $ExchangeRatesTable, ExchangeRate>, ), ExchangeRate, PrefetchHooks Function() >; typedef $$AccountsTableCreateCompanionBuilder = AccountsCompanion Function({ Value id, required String name, Value isMain, Value sortOrder, Value currency, Value createdAt, }); typedef $$AccountsTableUpdateCompanionBuilder = AccountsCompanion Function({ Value id, Value name, Value isMain, Value sortOrder, Value currency, Value createdAt, }); class $$AccountsTableFilterComposer extends Composer<_$AppDatabase, $AccountsTable> { $$AccountsTableFilterComposer({ 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 name => $composableBuilder( column: $table.name, builder: (column) => ColumnFilters(column), ); ColumnFilters get isMain => $composableBuilder( column: $table.isMain, builder: (column) => ColumnFilters(column), ); ColumnFilters get sortOrder => $composableBuilder( column: $table.sortOrder, builder: (column) => ColumnFilters(column), ); ColumnFilters get currency => $composableBuilder( column: $table.currency, builder: (column) => ColumnFilters(column), ); ColumnFilters get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnFilters(column), ); } class $$AccountsTableOrderingComposer extends Composer<_$AppDatabase, $AccountsTable> { $$AccountsTableOrderingComposer({ 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 name => $composableBuilder( column: $table.name, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get isMain => $composableBuilder( column: $table.isMain, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get sortOrder => $composableBuilder( column: $table.sortOrder, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get currency => $composableBuilder( column: $table.currency, builder: (column) => ColumnOrderings(column), ); ColumnOrderings get createdAt => $composableBuilder( column: $table.createdAt, builder: (column) => ColumnOrderings(column), ); } class $$AccountsTableAnnotationComposer extends Composer<_$AppDatabase, $AccountsTable> { $$AccountsTableAnnotationComposer({ required super.$db, required super.$table, super.joinBuilder, super.$addJoinBuilderToRootComposer, super.$removeJoinBuilderFromRootComposer, }); GeneratedColumn get id => $composableBuilder(column: $table.id, builder: (column) => column); GeneratedColumn get name => $composableBuilder(column: $table.name, builder: (column) => column); GeneratedColumn get isMain => $composableBuilder(column: $table.isMain, builder: (column) => column); GeneratedColumn get sortOrder => $composableBuilder(column: $table.sortOrder, builder: (column) => column); GeneratedColumn get currency => $composableBuilder(column: $table.currency, builder: (column) => column); GeneratedColumn get createdAt => $composableBuilder(column: $table.createdAt, builder: (column) => column); } class $$AccountsTableTableManager extends RootTableManager< _$AppDatabase, $AccountsTable, Account, $$AccountsTableFilterComposer, $$AccountsTableOrderingComposer, $$AccountsTableAnnotationComposer, $$AccountsTableCreateCompanionBuilder, $$AccountsTableUpdateCompanionBuilder, (Account, BaseReferences<_$AppDatabase, $AccountsTable, Account>), Account, PrefetchHooks Function() > { $$AccountsTableTableManager(_$AppDatabase db, $AccountsTable table) : super( TableManagerState( db: db, table: table, createFilteringComposer: () => $$AccountsTableFilterComposer($db: db, $table: table), createOrderingComposer: () => $$AccountsTableOrderingComposer($db: db, $table: table), createComputedFieldComposer: () => $$AccountsTableAnnotationComposer($db: db, $table: table), updateCompanionCallback: ({ Value id = const Value.absent(), Value name = const Value.absent(), Value isMain = const Value.absent(), Value sortOrder = const Value.absent(), Value currency = const Value.absent(), Value createdAt = const Value.absent(), }) => AccountsCompanion( id: id, name: name, isMain: isMain, sortOrder: sortOrder, currency: currency, createdAt: createdAt, ), createCompanionCallback: ({ Value id = const Value.absent(), required String name, Value isMain = const Value.absent(), Value sortOrder = const Value.absent(), Value currency = const Value.absent(), Value createdAt = const Value.absent(), }) => AccountsCompanion.insert( id: id, name: name, isMain: isMain, sortOrder: sortOrder, currency: currency, createdAt: createdAt, ), withReferenceMapper: (p0) => p0 .map((e) => (e.readTable(table), BaseReferences(db, table, e))) .toList(), prefetchHooksCallback: null, ), ); } typedef $$AccountsTableProcessedTableManager = ProcessedTableManager< _$AppDatabase, $AccountsTable, Account, $$AccountsTableFilterComposer, $$AccountsTableOrderingComposer, $$AccountsTableAnnotationComposer, $$AccountsTableCreateCompanionBuilder, $$AccountsTableUpdateCompanionBuilder, (Account, BaseReferences<_$AppDatabase, $AccountsTable, Account>), Account, PrefetchHooks Function() >; class $AppDatabaseManager { final _$AppDatabase _db; $AppDatabaseManager(this._db); $$TransactionsTableTableManager get transactions => $$TransactionsTableTableManager(_db, _db.transactions); $$CategoriesTableTableManager get categories => $$CategoriesTableTableManager(_db, _db.categories); $$BudgetsTableTableManager get budgets => $$BudgetsTableTableManager(_db, _db.budgets); $$ExchangeRatesTableTableManager get exchangeRates => $$ExchangeRatesTableTableManager(_db, _db.exchangeRates); $$AccountsTableTableManager get accounts => $$AccountsTableTableManager(_db, _db.accounts); }