// GENERATED CODE - DO NOT MODIFY BY HAND part of 'database.dart'; // ignore_for_file: type=lint class $DeviceInfoTableTable extends DeviceInfoTable with TableInfo<$DeviceInfoTableTable, DeviceInfo> { @override final GeneratedDatabase attachedDatabase; final String? _alias; $DeviceInfoTableTable(this.attachedDatabase, [this._alias]); static const VerificationMeta _usernameMeta = const VerificationMeta('username'); @override late final GeneratedColumn username = GeneratedColumn( 'username', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); static const VerificationMeta _phoneBrandMeta = const VerificationMeta('phoneBrand'); @override late final GeneratedColumn phoneBrand = GeneratedColumn( 'phone_brand', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); static const VerificationMeta _phoneModelMeta = const VerificationMeta('phoneModel'); @override late final GeneratedColumn phoneModel = GeneratedColumn( 'phone_model', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); static const VerificationMeta _phoneReleaseMeta = const VerificationMeta('phoneRelease'); @override late final GeneratedColumn phoneRelease = GeneratedColumn( 'phone_release', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); static const VerificationMeta _phoneAddressMeta = const VerificationMeta('phoneAddress'); @override late final GeneratedColumn phoneAddress = GeneratedColumn( 'phone_address', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); static const VerificationMeta _bleMacMeta = const VerificationMeta('bleMac'); @override late final GeneratedColumn bleMac = GeneratedColumn( 'ble_mac', aliasedName, false, type: DriftSqlType.string, requiredDuringInsert: true); static const VerificationMeta _bleNameMeta = const VerificationMeta('bleName'); @override late final GeneratedColumn bleName = GeneratedColumn( 'ble_name', 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); @override List get $columns => [ username, phoneBrand, phoneModel, phoneRelease, phoneAddress, bleMac, bleName, createdAt ]; @override String get aliasedName => _alias ?? actualTableName; @override String get actualTableName => $name; static const String $name = 'device_info_table'; @override VerificationContext validateIntegrity(Insertable instance, {bool isInserting = false}) { final context = VerificationContext(); final data = instance.toColumns(true); if (data.containsKey('username')) { context.handle(_usernameMeta, username.isAcceptableOrUnknown(data['username']!, _usernameMeta)); } else if (isInserting) { context.missing(_usernameMeta); } if (data.containsKey('phone_brand')) { context.handle( _phoneBrandMeta, phoneBrand.isAcceptableOrUnknown( data['phone_brand']!, _phoneBrandMeta)); } else if (isInserting) { context.missing(_phoneBrandMeta); } if (data.containsKey('phone_model')) { context.handle( _phoneModelMeta, phoneModel.isAcceptableOrUnknown( data['phone_model']!, _phoneModelMeta)); } else if (isInserting) { context.missing(_phoneModelMeta); } if (data.containsKey('phone_release')) { context.handle( _phoneReleaseMeta, phoneRelease.isAcceptableOrUnknown( data['phone_release']!, _phoneReleaseMeta)); } else if (isInserting) { context.missing(_phoneReleaseMeta); } if (data.containsKey('phone_address')) { context.handle( _phoneAddressMeta, phoneAddress.isAcceptableOrUnknown( data['phone_address']!, _phoneAddressMeta)); } else if (isInserting) { context.missing(_phoneAddressMeta); } if (data.containsKey('ble_mac')) { context.handle(_bleMacMeta, bleMac.isAcceptableOrUnknown(data['ble_mac']!, _bleMacMeta)); } else if (isInserting) { context.missing(_bleMacMeta); } if (data.containsKey('ble_name')) { context.handle(_bleNameMeta, bleName.isAcceptableOrUnknown(data['ble_name']!, _bleNameMeta)); } else if (isInserting) { context.missing(_bleNameMeta); } if (data.containsKey('created_at')) { context.handle(_createdAtMeta, createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta)); } else if (isInserting) { context.missing(_createdAtMeta); } return context; } @override Set get $primaryKey => {bleMac, username}; @override DeviceInfo map(Map data, {String? tablePrefix}) { final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : ''; return DeviceInfo( username: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}username'])!, phoneBrand: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}phone_brand'])!, phoneModel: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}phone_model'])!, phoneRelease: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}phone_release'])!, phoneAddress: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}phone_address'])!, bleMac: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}ble_mac'])!, bleName: attachedDatabase.typeMapping .read(DriftSqlType.string, data['${effectivePrefix}ble_name'])!, createdAt: attachedDatabase.typeMapping .read(DriftSqlType.int, data['${effectivePrefix}created_at'])!, ); } @override $DeviceInfoTableTable createAlias(String alias) { return $DeviceInfoTableTable(attachedDatabase, alias); } } class DeviceInfo extends DataClass implements Insertable { /// 登录用户名 final String username; /// 登录手机品牌,如Redmi final String phoneBrand; /// 登录手机认证型号,如22120RN86C final String phoneModel; /// 登录手机版本,如14 final String phoneRelease; /// 登录手机所在地址,如"北京市西城区月坛北街18号靠近物资大院" final String phoneAddress; /// 登录蓝牙mac地址 final String bleMac; /// 登录蓝牙名称 final String bleName; /// 日期 final int createdAt; const DeviceInfo( {required this.username, required this.phoneBrand, required this.phoneModel, required this.phoneRelease, required this.phoneAddress, required this.bleMac, required this.bleName, required this.createdAt}); @override Map toColumns(bool nullToAbsent) { final map = {}; map['username'] = Variable(username); map['phone_brand'] = Variable(phoneBrand); map['phone_model'] = Variable(phoneModel); map['phone_release'] = Variable(phoneRelease); map['phone_address'] = Variable(phoneAddress); map['ble_mac'] = Variable(bleMac); map['ble_name'] = Variable(bleName); map['created_at'] = Variable(createdAt); return map; } DeviceInfoTableCompanion toCompanion(bool nullToAbsent) { return DeviceInfoTableCompanion( username: Value(username), phoneBrand: Value(phoneBrand), phoneModel: Value(phoneModel), phoneRelease: Value(phoneRelease), phoneAddress: Value(phoneAddress), bleMac: Value(bleMac), bleName: Value(bleName), createdAt: Value(createdAt), ); } factory DeviceInfo.fromJson(Map json, {ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return DeviceInfo( username: serializer.fromJson(json['username']), phoneBrand: serializer.fromJson(json['phoneBrand']), phoneModel: serializer.fromJson(json['phoneModel']), phoneRelease: serializer.fromJson(json['phoneRelease']), phoneAddress: serializer.fromJson(json['phoneAddress']), bleMac: serializer.fromJson(json['bleMac']), bleName: serializer.fromJson(json['bleName']), createdAt: serializer.fromJson(json['createdAt']), ); } @override Map toJson({ValueSerializer? serializer}) { serializer ??= driftRuntimeOptions.defaultSerializer; return { 'username': serializer.toJson(username), 'phoneBrand': serializer.toJson(phoneBrand), 'phoneModel': serializer.toJson(phoneModel), 'phoneRelease': serializer.toJson(phoneRelease), 'phoneAddress': serializer.toJson(phoneAddress), 'bleMac': serializer.toJson(bleMac), 'bleName': serializer.toJson(bleName), 'createdAt': serializer.toJson(createdAt), }; } DeviceInfo copyWith( {String? username, String? phoneBrand, String? phoneModel, String? phoneRelease, String? phoneAddress, String? bleMac, String? bleName, int? createdAt}) => DeviceInfo( username: username ?? this.username, phoneBrand: phoneBrand ?? this.phoneBrand, phoneModel: phoneModel ?? this.phoneModel, phoneRelease: phoneRelease ?? this.phoneRelease, phoneAddress: phoneAddress ?? this.phoneAddress, bleMac: bleMac ?? this.bleMac, bleName: bleName ?? this.bleName, createdAt: createdAt ?? this.createdAt, ); @override String toString() { return (StringBuffer('DeviceInfo(') ..write('username: $username, ') ..write('phoneBrand: $phoneBrand, ') ..write('phoneModel: $phoneModel, ') ..write('phoneRelease: $phoneRelease, ') ..write('phoneAddress: $phoneAddress, ') ..write('bleMac: $bleMac, ') ..write('bleName: $bleName, ') ..write('createdAt: $createdAt') ..write(')')) .toString(); } @override int get hashCode => Object.hash(username, phoneBrand, phoneModel, phoneRelease, phoneAddress, bleMac, bleName, createdAt); @override bool operator ==(Object other) => identical(this, other) || (other is DeviceInfo && other.username == this.username && other.phoneBrand == this.phoneBrand && other.phoneModel == this.phoneModel && other.phoneRelease == this.phoneRelease && other.phoneAddress == this.phoneAddress && other.bleMac == this.bleMac && other.bleName == this.bleName && other.createdAt == this.createdAt); } class DeviceInfoTableCompanion extends UpdateCompanion { final Value username; final Value phoneBrand; final Value phoneModel; final Value phoneRelease; final Value phoneAddress; final Value bleMac; final Value bleName; final Value createdAt; final Value rowid; const DeviceInfoTableCompanion({ this.username = const Value.absent(), this.phoneBrand = const Value.absent(), this.phoneModel = const Value.absent(), this.phoneRelease = const Value.absent(), this.phoneAddress = const Value.absent(), this.bleMac = const Value.absent(), this.bleName = const Value.absent(), this.createdAt = const Value.absent(), this.rowid = const Value.absent(), }); DeviceInfoTableCompanion.insert({ required String username, required String phoneBrand, required String phoneModel, required String phoneRelease, required String phoneAddress, required String bleMac, required String bleName, required int createdAt, this.rowid = const Value.absent(), }) : username = Value(username), phoneBrand = Value(phoneBrand), phoneModel = Value(phoneModel), phoneRelease = Value(phoneRelease), phoneAddress = Value(phoneAddress), bleMac = Value(bleMac), bleName = Value(bleName), createdAt = Value(createdAt); static Insertable custom({ Expression? username, Expression? phoneBrand, Expression? phoneModel, Expression? phoneRelease, Expression? phoneAddress, Expression? bleMac, Expression? bleName, Expression? createdAt, Expression? rowid, }) { return RawValuesInsertable({ if (username != null) 'username': username, if (phoneBrand != null) 'phone_brand': phoneBrand, if (phoneModel != null) 'phone_model': phoneModel, if (phoneRelease != null) 'phone_release': phoneRelease, if (phoneAddress != null) 'phone_address': phoneAddress, if (bleMac != null) 'ble_mac': bleMac, if (bleName != null) 'ble_name': bleName, if (createdAt != null) 'created_at': createdAt, if (rowid != null) 'rowid': rowid, }); } DeviceInfoTableCompanion copyWith( {Value? username, Value? phoneBrand, Value? phoneModel, Value? phoneRelease, Value? phoneAddress, Value? bleMac, Value? bleName, Value? createdAt, Value? rowid}) { return DeviceInfoTableCompanion( username: username ?? this.username, phoneBrand: phoneBrand ?? this.phoneBrand, phoneModel: phoneModel ?? this.phoneModel, phoneRelease: phoneRelease ?? this.phoneRelease, phoneAddress: phoneAddress ?? this.phoneAddress, bleMac: bleMac ?? this.bleMac, bleName: bleName ?? this.bleName, createdAt: createdAt ?? this.createdAt, rowid: rowid ?? this.rowid, ); } @override Map toColumns(bool nullToAbsent) { final map = {}; if (username.present) { map['username'] = Variable(username.value); } if (phoneBrand.present) { map['phone_brand'] = Variable(phoneBrand.value); } if (phoneModel.present) { map['phone_model'] = Variable(phoneModel.value); } if (phoneRelease.present) { map['phone_release'] = Variable(phoneRelease.value); } if (phoneAddress.present) { map['phone_address'] = Variable(phoneAddress.value); } if (bleMac.present) { map['ble_mac'] = Variable(bleMac.value); } if (bleName.present) { map['ble_name'] = Variable(bleName.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('DeviceInfoTableCompanion(') ..write('username: $username, ') ..write('phoneBrand: $phoneBrand, ') ..write('phoneModel: $phoneModel, ') ..write('phoneRelease: $phoneRelease, ') ..write('phoneAddress: $phoneAddress, ') ..write('bleMac: $bleMac, ') ..write('bleName: $bleName, ') ..write('createdAt: $createdAt, ') ..write('rowid: $rowid') ..write(')')) .toString(); } } abstract class _$MyDatabase extends GeneratedDatabase { _$MyDatabase(QueryExecutor e) : super(e); _$MyDatabaseManager get managers => _$MyDatabaseManager(this); late final $DeviceInfoTableTable deviceInfoTable = $DeviceInfoTableTable(this); late final DeviceInfoTableDao deviceInfoTableDao = DeviceInfoTableDao(this as MyDatabase); @override Iterable> get allTables => allSchemaEntities.whereType>(); @override List get allSchemaEntities => [deviceInfoTable]; } typedef $$DeviceInfoTableTableInsertCompanionBuilder = DeviceInfoTableCompanion Function({ required String username, required String phoneBrand, required String phoneModel, required String phoneRelease, required String phoneAddress, required String bleMac, required String bleName, required int createdAt, Value rowid, }); typedef $$DeviceInfoTableTableUpdateCompanionBuilder = DeviceInfoTableCompanion Function({ Value username, Value phoneBrand, Value phoneModel, Value phoneRelease, Value phoneAddress, Value bleMac, Value bleName, Value createdAt, Value rowid, }); class $$DeviceInfoTableTableTableManager extends RootTableManager< _$MyDatabase, $DeviceInfoTableTable, DeviceInfo, $$DeviceInfoTableTableFilterComposer, $$DeviceInfoTableTableOrderingComposer, $$DeviceInfoTableTableProcessedTableManager, $$DeviceInfoTableTableInsertCompanionBuilder, $$DeviceInfoTableTableUpdateCompanionBuilder> { $$DeviceInfoTableTableTableManager( _$MyDatabase db, $DeviceInfoTableTable table) : super(TableManagerState( db: db, table: table, filteringComposer: $$DeviceInfoTableTableFilterComposer(ComposerState(db, table)), orderingComposer: $$DeviceInfoTableTableOrderingComposer(ComposerState(db, table)), getChildManagerBuilder: (p) => $$DeviceInfoTableTableProcessedTableManager(p), getUpdateCompanionBuilder: ({ Value username = const Value.absent(), Value phoneBrand = const Value.absent(), Value phoneModel = const Value.absent(), Value phoneRelease = const Value.absent(), Value phoneAddress = const Value.absent(), Value bleMac = const Value.absent(), Value bleName = const Value.absent(), Value createdAt = const Value.absent(), Value rowid = const Value.absent(), }) => DeviceInfoTableCompanion( username: username, phoneBrand: phoneBrand, phoneModel: phoneModel, phoneRelease: phoneRelease, phoneAddress: phoneAddress, bleMac: bleMac, bleName: bleName, createdAt: createdAt, rowid: rowid, ), getInsertCompanionBuilder: ({ required String username, required String phoneBrand, required String phoneModel, required String phoneRelease, required String phoneAddress, required String bleMac, required String bleName, required int createdAt, Value rowid = const Value.absent(), }) => DeviceInfoTableCompanion.insert( username: username, phoneBrand: phoneBrand, phoneModel: phoneModel, phoneRelease: phoneRelease, phoneAddress: phoneAddress, bleMac: bleMac, bleName: bleName, createdAt: createdAt, rowid: rowid, ), )); } class $$DeviceInfoTableTableProcessedTableManager extends ProcessedTableManager< _$MyDatabase, $DeviceInfoTableTable, DeviceInfo, $$DeviceInfoTableTableFilterComposer, $$DeviceInfoTableTableOrderingComposer, $$DeviceInfoTableTableProcessedTableManager, $$DeviceInfoTableTableInsertCompanionBuilder, $$DeviceInfoTableTableUpdateCompanionBuilder> { $$DeviceInfoTableTableProcessedTableManager(super.$state); } class $$DeviceInfoTableTableFilterComposer extends FilterComposer<_$MyDatabase, $DeviceInfoTableTable> { $$DeviceInfoTableTableFilterComposer(super.$state); ColumnFilters get username => $state.composableBuilder( column: $state.table.username, builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders)); ColumnFilters get phoneBrand => $state.composableBuilder( column: $state.table.phoneBrand, builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders)); ColumnFilters get phoneModel => $state.composableBuilder( column: $state.table.phoneModel, builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders)); ColumnFilters get phoneRelease => $state.composableBuilder( column: $state.table.phoneRelease, builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders)); ColumnFilters get phoneAddress => $state.composableBuilder( column: $state.table.phoneAddress, builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders)); ColumnFilters get bleMac => $state.composableBuilder( column: $state.table.bleMac, builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders)); ColumnFilters get bleName => $state.composableBuilder( column: $state.table.bleName, builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders)); ColumnFilters get createdAt => $state.composableBuilder( column: $state.table.createdAt, builder: (column, joinBuilders) => ColumnFilters(column, joinBuilders: joinBuilders)); } class $$DeviceInfoTableTableOrderingComposer extends OrderingComposer<_$MyDatabase, $DeviceInfoTableTable> { $$DeviceInfoTableTableOrderingComposer(super.$state); ColumnOrderings get username => $state.composableBuilder( column: $state.table.username, builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders)); ColumnOrderings get phoneBrand => $state.composableBuilder( column: $state.table.phoneBrand, builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders)); ColumnOrderings get phoneModel => $state.composableBuilder( column: $state.table.phoneModel, builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders)); ColumnOrderings get phoneRelease => $state.composableBuilder( column: $state.table.phoneRelease, builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders)); ColumnOrderings get phoneAddress => $state.composableBuilder( column: $state.table.phoneAddress, builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders)); ColumnOrderings get bleMac => $state.composableBuilder( column: $state.table.bleMac, builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders)); ColumnOrderings get bleName => $state.composableBuilder( column: $state.table.bleName, builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders)); ColumnOrderings get createdAt => $state.composableBuilder( column: $state.table.createdAt, builder: (column, joinBuilders) => ColumnOrderings(column, joinBuilders: joinBuilders)); } class _$MyDatabaseManager { final _$MyDatabase _db; _$MyDatabaseManager(this._db); $$DeviceInfoTableTableTableManager get deviceInfoTable => $$DeviceInfoTableTableTableManager(_db, _db.deviceInfoTable); }