Add Flutter project skeleton (Android-only MVP)
Five-layer architecture per DMC_Architektur_und_Design.md: FlightControllerLink abstraction (Mock + MSP stub), protocol-neutral mission domain layer, App-Mode state machine with Ready-to-Fly gate, Drift persistence schema, and placeholder UI screens wired via go_router. App icon generated from design/Y2_pink_dark.svg. Verified with flutter analyze and flutter test. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
62d655fe8e
commit
346fcc2183
@@ -0,0 +1,39 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:drift/drift.dart';
|
||||
import 'package:drift/native.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
|
||||
part 'app_database.g.dart';
|
||||
|
||||
/// Persistenz fuer Missionen (Architektur-Doku 4.15): Drift statt Hive, weil
|
||||
/// indexierte Abfragen (Suche nach Name/Ort/Datum) benoetigt werden und das
|
||||
/// Schema kompatibel zu einem kuenftigen lokal-first Server-Sync-Muster
|
||||
/// (Dirty-Flags, Server-IDs) bleiben soll.
|
||||
class Missions extends Table {
|
||||
IntColumn get id => integer().autoIncrement()();
|
||||
TextColumn get name => text()();
|
||||
TextColumn get location => text().nullable()();
|
||||
DateTimeColumn get createdAt =>
|
||||
dateTime().withDefault(currentDateAndTime)();
|
||||
TextColumn get waypointsJson => text()();
|
||||
BoolColumn get isDirty => boolean().withDefault(const Constant(true))();
|
||||
TextColumn get serverId => text().nullable()();
|
||||
}
|
||||
|
||||
@DriftDatabase(tables: [Missions])
|
||||
class AppDatabase extends _$AppDatabase {
|
||||
AppDatabase() : super(_openConnection());
|
||||
|
||||
@override
|
||||
int get schemaVersion => 1;
|
||||
|
||||
static LazyDatabase _openConnection() {
|
||||
return LazyDatabase(() async {
|
||||
final dbFolder = await getApplicationDocumentsDirectory();
|
||||
final file = File(p.join(dbFolder.path, 'dmc_missions.sqlite'));
|
||||
return NativeDatabase.createInBackground(file);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,708 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'app_database.dart';
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
class $MissionsTable extends Missions with TableInfo<$MissionsTable, Mission> {
|
||||
@override
|
||||
final GeneratedDatabase attachedDatabase;
|
||||
final String? _alias;
|
||||
$MissionsTable(this.attachedDatabase, [this._alias]);
|
||||
static const VerificationMeta _idMeta = const VerificationMeta('id');
|
||||
@override
|
||||
late final GeneratedColumn<int> id = GeneratedColumn<int>(
|
||||
'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<String> name = GeneratedColumn<String>(
|
||||
'name',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.string,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
static const VerificationMeta _locationMeta = const VerificationMeta(
|
||||
'location',
|
||||
);
|
||||
@override
|
||||
late final GeneratedColumn<String> location = GeneratedColumn<String>(
|
||||
'location',
|
||||
aliasedName,
|
||||
true,
|
||||
type: DriftSqlType.string,
|
||||
requiredDuringInsert: false,
|
||||
);
|
||||
static const VerificationMeta _createdAtMeta = const VerificationMeta(
|
||||
'createdAt',
|
||||
);
|
||||
@override
|
||||
late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>(
|
||||
'created_at',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.dateTime,
|
||||
requiredDuringInsert: false,
|
||||
defaultValue: currentDateAndTime,
|
||||
);
|
||||
static const VerificationMeta _waypointsJsonMeta = const VerificationMeta(
|
||||
'waypointsJson',
|
||||
);
|
||||
@override
|
||||
late final GeneratedColumn<String> waypointsJson = GeneratedColumn<String>(
|
||||
'waypoints_json',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.string,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
static const VerificationMeta _isDirtyMeta = const VerificationMeta(
|
||||
'isDirty',
|
||||
);
|
||||
@override
|
||||
late final GeneratedColumn<bool> isDirty = GeneratedColumn<bool>(
|
||||
'is_dirty',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.bool,
|
||||
requiredDuringInsert: false,
|
||||
defaultConstraints: GeneratedColumn.constraintIsAlways(
|
||||
'CHECK ("is_dirty" IN (0, 1))',
|
||||
),
|
||||
defaultValue: const Constant(true),
|
||||
);
|
||||
static const VerificationMeta _serverIdMeta = const VerificationMeta(
|
||||
'serverId',
|
||||
);
|
||||
@override
|
||||
late final GeneratedColumn<String> serverId = GeneratedColumn<String>(
|
||||
'server_id',
|
||||
aliasedName,
|
||||
true,
|
||||
type: DriftSqlType.string,
|
||||
requiredDuringInsert: false,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [
|
||||
id,
|
||||
name,
|
||||
location,
|
||||
createdAt,
|
||||
waypointsJson,
|
||||
isDirty,
|
||||
serverId,
|
||||
];
|
||||
@override
|
||||
String get aliasedName => _alias ?? actualTableName;
|
||||
@override
|
||||
String get actualTableName => $name;
|
||||
static const String $name = 'missions';
|
||||
@override
|
||||
VerificationContext validateIntegrity(
|
||||
Insertable<Mission> 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('location')) {
|
||||
context.handle(
|
||||
_locationMeta,
|
||||
location.isAcceptableOrUnknown(data['location']!, _locationMeta),
|
||||
);
|
||||
}
|
||||
if (data.containsKey('created_at')) {
|
||||
context.handle(
|
||||
_createdAtMeta,
|
||||
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta),
|
||||
);
|
||||
}
|
||||
if (data.containsKey('waypoints_json')) {
|
||||
context.handle(
|
||||
_waypointsJsonMeta,
|
||||
waypointsJson.isAcceptableOrUnknown(
|
||||
data['waypoints_json']!,
|
||||
_waypointsJsonMeta,
|
||||
),
|
||||
);
|
||||
} else if (isInserting) {
|
||||
context.missing(_waypointsJsonMeta);
|
||||
}
|
||||
if (data.containsKey('is_dirty')) {
|
||||
context.handle(
|
||||
_isDirtyMeta,
|
||||
isDirty.isAcceptableOrUnknown(data['is_dirty']!, _isDirtyMeta),
|
||||
);
|
||||
}
|
||||
if (data.containsKey('server_id')) {
|
||||
context.handle(
|
||||
_serverIdMeta,
|
||||
serverId.isAcceptableOrUnknown(data['server_id']!, _serverIdMeta),
|
||||
);
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
@override
|
||||
Set<GeneratedColumn> get $primaryKey => {id};
|
||||
@override
|
||||
Mission map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||
return Mission(
|
||||
id: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.int,
|
||||
data['${effectivePrefix}id'],
|
||||
)!,
|
||||
name: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}name'],
|
||||
)!,
|
||||
location: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}location'],
|
||||
),
|
||||
createdAt: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.dateTime,
|
||||
data['${effectivePrefix}created_at'],
|
||||
)!,
|
||||
waypointsJson: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}waypoints_json'],
|
||||
)!,
|
||||
isDirty: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.bool,
|
||||
data['${effectivePrefix}is_dirty'],
|
||||
)!,
|
||||
serverId: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}server_id'],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
$MissionsTable createAlias(String alias) {
|
||||
return $MissionsTable(attachedDatabase, alias);
|
||||
}
|
||||
}
|
||||
|
||||
class Mission extends DataClass implements Insertable<Mission> {
|
||||
final int id;
|
||||
final String name;
|
||||
final String? location;
|
||||
final DateTime createdAt;
|
||||
final String waypointsJson;
|
||||
final bool isDirty;
|
||||
final String? serverId;
|
||||
const Mission({
|
||||
required this.id,
|
||||
required this.name,
|
||||
this.location,
|
||||
required this.createdAt,
|
||||
required this.waypointsJson,
|
||||
required this.isDirty,
|
||||
this.serverId,
|
||||
});
|
||||
@override
|
||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, Expression>{};
|
||||
map['id'] = Variable<int>(id);
|
||||
map['name'] = Variable<String>(name);
|
||||
if (!nullToAbsent || location != null) {
|
||||
map['location'] = Variable<String>(location);
|
||||
}
|
||||
map['created_at'] = Variable<DateTime>(createdAt);
|
||||
map['waypoints_json'] = Variable<String>(waypointsJson);
|
||||
map['is_dirty'] = Variable<bool>(isDirty);
|
||||
if (!nullToAbsent || serverId != null) {
|
||||
map['server_id'] = Variable<String>(serverId);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
MissionsCompanion toCompanion(bool nullToAbsent) {
|
||||
return MissionsCompanion(
|
||||
id: Value(id),
|
||||
name: Value(name),
|
||||
location: location == null && nullToAbsent
|
||||
? const Value.absent()
|
||||
: Value(location),
|
||||
createdAt: Value(createdAt),
|
||||
waypointsJson: Value(waypointsJson),
|
||||
isDirty: Value(isDirty),
|
||||
serverId: serverId == null && nullToAbsent
|
||||
? const Value.absent()
|
||||
: Value(serverId),
|
||||
);
|
||||
}
|
||||
|
||||
factory Mission.fromJson(
|
||||
Map<String, dynamic> json, {
|
||||
ValueSerializer? serializer,
|
||||
}) {
|
||||
serializer ??= driftRuntimeOptions.defaultSerializer;
|
||||
return Mission(
|
||||
id: serializer.fromJson<int>(json['id']),
|
||||
name: serializer.fromJson<String>(json['name']),
|
||||
location: serializer.fromJson<String?>(json['location']),
|
||||
createdAt: serializer.fromJson<DateTime>(json['createdAt']),
|
||||
waypointsJson: serializer.fromJson<String>(json['waypointsJson']),
|
||||
isDirty: serializer.fromJson<bool>(json['isDirty']),
|
||||
serverId: serializer.fromJson<String?>(json['serverId']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
||||
serializer ??= driftRuntimeOptions.defaultSerializer;
|
||||
return <String, dynamic>{
|
||||
'id': serializer.toJson<int>(id),
|
||||
'name': serializer.toJson<String>(name),
|
||||
'location': serializer.toJson<String?>(location),
|
||||
'createdAt': serializer.toJson<DateTime>(createdAt),
|
||||
'waypointsJson': serializer.toJson<String>(waypointsJson),
|
||||
'isDirty': serializer.toJson<bool>(isDirty),
|
||||
'serverId': serializer.toJson<String?>(serverId),
|
||||
};
|
||||
}
|
||||
|
||||
Mission copyWith({
|
||||
int? id,
|
||||
String? name,
|
||||
Value<String?> location = const Value.absent(),
|
||||
DateTime? createdAt,
|
||||
String? waypointsJson,
|
||||
bool? isDirty,
|
||||
Value<String?> serverId = const Value.absent(),
|
||||
}) => Mission(
|
||||
id: id ?? this.id,
|
||||
name: name ?? this.name,
|
||||
location: location.present ? location.value : this.location,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
waypointsJson: waypointsJson ?? this.waypointsJson,
|
||||
isDirty: isDirty ?? this.isDirty,
|
||||
serverId: serverId.present ? serverId.value : this.serverId,
|
||||
);
|
||||
Mission copyWithCompanion(MissionsCompanion data) {
|
||||
return Mission(
|
||||
id: data.id.present ? data.id.value : this.id,
|
||||
name: data.name.present ? data.name.value : this.name,
|
||||
location: data.location.present ? data.location.value : this.location,
|
||||
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
|
||||
waypointsJson: data.waypointsJson.present
|
||||
? data.waypointsJson.value
|
||||
: this.waypointsJson,
|
||||
isDirty: data.isDirty.present ? data.isDirty.value : this.isDirty,
|
||||
serverId: data.serverId.present ? data.serverId.value : this.serverId,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return (StringBuffer('Mission(')
|
||||
..write('id: $id, ')
|
||||
..write('name: $name, ')
|
||||
..write('location: $location, ')
|
||||
..write('createdAt: $createdAt, ')
|
||||
..write('waypointsJson: $waypointsJson, ')
|
||||
..write('isDirty: $isDirty, ')
|
||||
..write('serverId: $serverId')
|
||||
..write(')'))
|
||||
.toString();
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
id,
|
||||
name,
|
||||
location,
|
||||
createdAt,
|
||||
waypointsJson,
|
||||
isDirty,
|
||||
serverId,
|
||||
);
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
(other is Mission &&
|
||||
other.id == this.id &&
|
||||
other.name == this.name &&
|
||||
other.location == this.location &&
|
||||
other.createdAt == this.createdAt &&
|
||||
other.waypointsJson == this.waypointsJson &&
|
||||
other.isDirty == this.isDirty &&
|
||||
other.serverId == this.serverId);
|
||||
}
|
||||
|
||||
class MissionsCompanion extends UpdateCompanion<Mission> {
|
||||
final Value<int> id;
|
||||
final Value<String> name;
|
||||
final Value<String?> location;
|
||||
final Value<DateTime> createdAt;
|
||||
final Value<String> waypointsJson;
|
||||
final Value<bool> isDirty;
|
||||
final Value<String?> serverId;
|
||||
const MissionsCompanion({
|
||||
this.id = const Value.absent(),
|
||||
this.name = const Value.absent(),
|
||||
this.location = const Value.absent(),
|
||||
this.createdAt = const Value.absent(),
|
||||
this.waypointsJson = const Value.absent(),
|
||||
this.isDirty = const Value.absent(),
|
||||
this.serverId = const Value.absent(),
|
||||
});
|
||||
MissionsCompanion.insert({
|
||||
this.id = const Value.absent(),
|
||||
required String name,
|
||||
this.location = const Value.absent(),
|
||||
this.createdAt = const Value.absent(),
|
||||
required String waypointsJson,
|
||||
this.isDirty = const Value.absent(),
|
||||
this.serverId = const Value.absent(),
|
||||
}) : name = Value(name),
|
||||
waypointsJson = Value(waypointsJson);
|
||||
static Insertable<Mission> custom({
|
||||
Expression<int>? id,
|
||||
Expression<String>? name,
|
||||
Expression<String>? location,
|
||||
Expression<DateTime>? createdAt,
|
||||
Expression<String>? waypointsJson,
|
||||
Expression<bool>? isDirty,
|
||||
Expression<String>? serverId,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (id != null) 'id': id,
|
||||
if (name != null) 'name': name,
|
||||
if (location != null) 'location': location,
|
||||
if (createdAt != null) 'created_at': createdAt,
|
||||
if (waypointsJson != null) 'waypoints_json': waypointsJson,
|
||||
if (isDirty != null) 'is_dirty': isDirty,
|
||||
if (serverId != null) 'server_id': serverId,
|
||||
});
|
||||
}
|
||||
|
||||
MissionsCompanion copyWith({
|
||||
Value<int>? id,
|
||||
Value<String>? name,
|
||||
Value<String?>? location,
|
||||
Value<DateTime>? createdAt,
|
||||
Value<String>? waypointsJson,
|
||||
Value<bool>? isDirty,
|
||||
Value<String?>? serverId,
|
||||
}) {
|
||||
return MissionsCompanion(
|
||||
id: id ?? this.id,
|
||||
name: name ?? this.name,
|
||||
location: location ?? this.location,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
waypointsJson: waypointsJson ?? this.waypointsJson,
|
||||
isDirty: isDirty ?? this.isDirty,
|
||||
serverId: serverId ?? this.serverId,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, Expression>{};
|
||||
if (id.present) {
|
||||
map['id'] = Variable<int>(id.value);
|
||||
}
|
||||
if (name.present) {
|
||||
map['name'] = Variable<String>(name.value);
|
||||
}
|
||||
if (location.present) {
|
||||
map['location'] = Variable<String>(location.value);
|
||||
}
|
||||
if (createdAt.present) {
|
||||
map['created_at'] = Variable<DateTime>(createdAt.value);
|
||||
}
|
||||
if (waypointsJson.present) {
|
||||
map['waypoints_json'] = Variable<String>(waypointsJson.value);
|
||||
}
|
||||
if (isDirty.present) {
|
||||
map['is_dirty'] = Variable<bool>(isDirty.value);
|
||||
}
|
||||
if (serverId.present) {
|
||||
map['server_id'] = Variable<String>(serverId.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return (StringBuffer('MissionsCompanion(')
|
||||
..write('id: $id, ')
|
||||
..write('name: $name, ')
|
||||
..write('location: $location, ')
|
||||
..write('createdAt: $createdAt, ')
|
||||
..write('waypointsJson: $waypointsJson, ')
|
||||
..write('isDirty: $isDirty, ')
|
||||
..write('serverId: $serverId')
|
||||
..write(')'))
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _$AppDatabase extends GeneratedDatabase {
|
||||
_$AppDatabase(QueryExecutor e) : super(e);
|
||||
$AppDatabaseManager get managers => $AppDatabaseManager(this);
|
||||
late final $MissionsTable missions = $MissionsTable(this);
|
||||
@override
|
||||
Iterable<TableInfo<Table, Object?>> get allTables =>
|
||||
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
|
||||
@override
|
||||
List<DatabaseSchemaEntity> get allSchemaEntities => [missions];
|
||||
}
|
||||
|
||||
typedef $$MissionsTableCreateCompanionBuilder =
|
||||
MissionsCompanion Function({
|
||||
Value<int> id,
|
||||
required String name,
|
||||
Value<String?> location,
|
||||
Value<DateTime> createdAt,
|
||||
required String waypointsJson,
|
||||
Value<bool> isDirty,
|
||||
Value<String?> serverId,
|
||||
});
|
||||
typedef $$MissionsTableUpdateCompanionBuilder =
|
||||
MissionsCompanion Function({
|
||||
Value<int> id,
|
||||
Value<String> name,
|
||||
Value<String?> location,
|
||||
Value<DateTime> createdAt,
|
||||
Value<String> waypointsJson,
|
||||
Value<bool> isDirty,
|
||||
Value<String?> serverId,
|
||||
});
|
||||
|
||||
class $$MissionsTableFilterComposer
|
||||
extends Composer<_$AppDatabase, $MissionsTable> {
|
||||
$$MissionsTableFilterComposer({
|
||||
required super.$db,
|
||||
required super.$table,
|
||||
super.joinBuilder,
|
||||
super.$addJoinBuilderToRootComposer,
|
||||
super.$removeJoinBuilderFromRootComposer,
|
||||
});
|
||||
ColumnFilters<int> get id => $composableBuilder(
|
||||
column: $table.id,
|
||||
builder: (column) => ColumnFilters(column),
|
||||
);
|
||||
|
||||
ColumnFilters<String> get name => $composableBuilder(
|
||||
column: $table.name,
|
||||
builder: (column) => ColumnFilters(column),
|
||||
);
|
||||
|
||||
ColumnFilters<String> get location => $composableBuilder(
|
||||
column: $table.location,
|
||||
builder: (column) => ColumnFilters(column),
|
||||
);
|
||||
|
||||
ColumnFilters<DateTime> get createdAt => $composableBuilder(
|
||||
column: $table.createdAt,
|
||||
builder: (column) => ColumnFilters(column),
|
||||
);
|
||||
|
||||
ColumnFilters<String> get waypointsJson => $composableBuilder(
|
||||
column: $table.waypointsJson,
|
||||
builder: (column) => ColumnFilters(column),
|
||||
);
|
||||
|
||||
ColumnFilters<bool> get isDirty => $composableBuilder(
|
||||
column: $table.isDirty,
|
||||
builder: (column) => ColumnFilters(column),
|
||||
);
|
||||
|
||||
ColumnFilters<String> get serverId => $composableBuilder(
|
||||
column: $table.serverId,
|
||||
builder: (column) => ColumnFilters(column),
|
||||
);
|
||||
}
|
||||
|
||||
class $$MissionsTableOrderingComposer
|
||||
extends Composer<_$AppDatabase, $MissionsTable> {
|
||||
$$MissionsTableOrderingComposer({
|
||||
required super.$db,
|
||||
required super.$table,
|
||||
super.joinBuilder,
|
||||
super.$addJoinBuilderToRootComposer,
|
||||
super.$removeJoinBuilderFromRootComposer,
|
||||
});
|
||||
ColumnOrderings<int> get id => $composableBuilder(
|
||||
column: $table.id,
|
||||
builder: (column) => ColumnOrderings(column),
|
||||
);
|
||||
|
||||
ColumnOrderings<String> get name => $composableBuilder(
|
||||
column: $table.name,
|
||||
builder: (column) => ColumnOrderings(column),
|
||||
);
|
||||
|
||||
ColumnOrderings<String> get location => $composableBuilder(
|
||||
column: $table.location,
|
||||
builder: (column) => ColumnOrderings(column),
|
||||
);
|
||||
|
||||
ColumnOrderings<DateTime> get createdAt => $composableBuilder(
|
||||
column: $table.createdAt,
|
||||
builder: (column) => ColumnOrderings(column),
|
||||
);
|
||||
|
||||
ColumnOrderings<String> get waypointsJson => $composableBuilder(
|
||||
column: $table.waypointsJson,
|
||||
builder: (column) => ColumnOrderings(column),
|
||||
);
|
||||
|
||||
ColumnOrderings<bool> get isDirty => $composableBuilder(
|
||||
column: $table.isDirty,
|
||||
builder: (column) => ColumnOrderings(column),
|
||||
);
|
||||
|
||||
ColumnOrderings<String> get serverId => $composableBuilder(
|
||||
column: $table.serverId,
|
||||
builder: (column) => ColumnOrderings(column),
|
||||
);
|
||||
}
|
||||
|
||||
class $$MissionsTableAnnotationComposer
|
||||
extends Composer<_$AppDatabase, $MissionsTable> {
|
||||
$$MissionsTableAnnotationComposer({
|
||||
required super.$db,
|
||||
required super.$table,
|
||||
super.joinBuilder,
|
||||
super.$addJoinBuilderToRootComposer,
|
||||
super.$removeJoinBuilderFromRootComposer,
|
||||
});
|
||||
GeneratedColumn<int> get id =>
|
||||
$composableBuilder(column: $table.id, builder: (column) => column);
|
||||
|
||||
GeneratedColumn<String> get name =>
|
||||
$composableBuilder(column: $table.name, builder: (column) => column);
|
||||
|
||||
GeneratedColumn<String> get location =>
|
||||
$composableBuilder(column: $table.location, builder: (column) => column);
|
||||
|
||||
GeneratedColumn<DateTime> get createdAt =>
|
||||
$composableBuilder(column: $table.createdAt, builder: (column) => column);
|
||||
|
||||
GeneratedColumn<String> get waypointsJson => $composableBuilder(
|
||||
column: $table.waypointsJson,
|
||||
builder: (column) => column,
|
||||
);
|
||||
|
||||
GeneratedColumn<bool> get isDirty =>
|
||||
$composableBuilder(column: $table.isDirty, builder: (column) => column);
|
||||
|
||||
GeneratedColumn<String> get serverId =>
|
||||
$composableBuilder(column: $table.serverId, builder: (column) => column);
|
||||
}
|
||||
|
||||
class $$MissionsTableTableManager
|
||||
extends
|
||||
RootTableManager<
|
||||
_$AppDatabase,
|
||||
$MissionsTable,
|
||||
Mission,
|
||||
$$MissionsTableFilterComposer,
|
||||
$$MissionsTableOrderingComposer,
|
||||
$$MissionsTableAnnotationComposer,
|
||||
$$MissionsTableCreateCompanionBuilder,
|
||||
$$MissionsTableUpdateCompanionBuilder,
|
||||
(Mission, BaseReferences<_$AppDatabase, $MissionsTable, Mission>),
|
||||
Mission,
|
||||
PrefetchHooks Function()
|
||||
> {
|
||||
$$MissionsTableTableManager(_$AppDatabase db, $MissionsTable table)
|
||||
: super(
|
||||
TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
createFilteringComposer: () =>
|
||||
$$MissionsTableFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer: () =>
|
||||
$$MissionsTableOrderingComposer($db: db, $table: table),
|
||||
createComputedFieldComposer: () =>
|
||||
$$MissionsTableAnnotationComposer($db: db, $table: table),
|
||||
updateCompanionCallback:
|
||||
({
|
||||
Value<int> id = const Value.absent(),
|
||||
Value<String> name = const Value.absent(),
|
||||
Value<String?> location = const Value.absent(),
|
||||
Value<DateTime> createdAt = const Value.absent(),
|
||||
Value<String> waypointsJson = const Value.absent(),
|
||||
Value<bool> isDirty = const Value.absent(),
|
||||
Value<String?> serverId = const Value.absent(),
|
||||
}) => MissionsCompanion(
|
||||
id: id,
|
||||
name: name,
|
||||
location: location,
|
||||
createdAt: createdAt,
|
||||
waypointsJson: waypointsJson,
|
||||
isDirty: isDirty,
|
||||
serverId: serverId,
|
||||
),
|
||||
createCompanionCallback:
|
||||
({
|
||||
Value<int> id = const Value.absent(),
|
||||
required String name,
|
||||
Value<String?> location = const Value.absent(),
|
||||
Value<DateTime> createdAt = const Value.absent(),
|
||||
required String waypointsJson,
|
||||
Value<bool> isDirty = const Value.absent(),
|
||||
Value<String?> serverId = const Value.absent(),
|
||||
}) => MissionsCompanion.insert(
|
||||
id: id,
|
||||
name: name,
|
||||
location: location,
|
||||
createdAt: createdAt,
|
||||
waypointsJson: waypointsJson,
|
||||
isDirty: isDirty,
|
||||
serverId: serverId,
|
||||
),
|
||||
withReferenceMapper: (p0) => p0
|
||||
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
|
||||
.toList(),
|
||||
prefetchHooksCallback: null,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
typedef $$MissionsTableProcessedTableManager =
|
||||
ProcessedTableManager<
|
||||
_$AppDatabase,
|
||||
$MissionsTable,
|
||||
Mission,
|
||||
$$MissionsTableFilterComposer,
|
||||
$$MissionsTableOrderingComposer,
|
||||
$$MissionsTableAnnotationComposer,
|
||||
$$MissionsTableCreateCompanionBuilder,
|
||||
$$MissionsTableUpdateCompanionBuilder,
|
||||
(Mission, BaseReferences<_$AppDatabase, $MissionsTable, Mission>),
|
||||
Mission,
|
||||
PrefetchHooks Function()
|
||||
>;
|
||||
|
||||
class $AppDatabaseManager {
|
||||
final _$AppDatabase _db;
|
||||
$AppDatabaseManager(this._db);
|
||||
$$MissionsTableTableManager get missions =>
|
||||
$$MissionsTableTableManager(_db, _db.missions);
|
||||
}
|
||||
Reference in New Issue
Block a user