feat: add remote products and qr code for payconic
This commit is contained in:
@@ -97,6 +97,17 @@ class $ProductsTable extends Products
|
||||
type: DriftSqlType.string,
|
||||
requiredDuringInsert: false,
|
||||
);
|
||||
static const VerificationMeta _imageIdMeta = const VerificationMeta(
|
||||
'imageId',
|
||||
);
|
||||
@override
|
||||
late final GeneratedColumn<String> imageId = GeneratedColumn<String>(
|
||||
'image_id',
|
||||
aliasedName,
|
||||
true,
|
||||
type: DriftSqlType.string,
|
||||
requiredDuringInsert: false,
|
||||
);
|
||||
static const VerificationMeta _activeMeta = const VerificationMeta('active');
|
||||
@override
|
||||
late final GeneratedColumn<bool> active = GeneratedColumn<bool>(
|
||||
@@ -120,6 +131,7 @@ class $ProductsTable extends Products
|
||||
infiniteStock,
|
||||
priceInCents,
|
||||
imagePath,
|
||||
imageId,
|
||||
active,
|
||||
];
|
||||
@override
|
||||
@@ -203,6 +215,12 @@ class $ProductsTable extends Products
|
||||
imagePath.isAcceptableOrUnknown(data['image_path']!, _imagePathMeta),
|
||||
);
|
||||
}
|
||||
if (data.containsKey('image_id')) {
|
||||
context.handle(
|
||||
_imageIdMeta,
|
||||
imageId.isAcceptableOrUnknown(data['image_id']!, _imageIdMeta),
|
||||
);
|
||||
}
|
||||
if (data.containsKey('active')) {
|
||||
context.handle(
|
||||
_activeMeta,
|
||||
@@ -250,6 +268,10 @@ class $ProductsTable extends Products
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}image_path'],
|
||||
),
|
||||
imageId: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}image_id'],
|
||||
),
|
||||
active: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.bool,
|
||||
data['${effectivePrefix}active'],
|
||||
@@ -273,7 +295,13 @@ class ProductRow extends DataClass implements Insertable<ProductRow> {
|
||||
/// Products like tap water that are never counted; their stock is ignored.
|
||||
final bool infiniteStock;
|
||||
final int priceInCents;
|
||||
|
||||
/// The picture shown on the tile: a local file, also offline.
|
||||
final String? imagePath;
|
||||
|
||||
/// The server's picture of this product (`/images/<imageId>`); [imagePath]
|
||||
/// is its downloaded copy once that finished. Null: none on the server.
|
||||
final String? imageId;
|
||||
final bool active;
|
||||
const ProductRow({
|
||||
required this.id,
|
||||
@@ -284,6 +312,7 @@ class ProductRow extends DataClass implements Insertable<ProductRow> {
|
||||
required this.infiniteStock,
|
||||
required this.priceInCents,
|
||||
this.imagePath,
|
||||
this.imageId,
|
||||
required this.active,
|
||||
});
|
||||
@override
|
||||
@@ -299,6 +328,9 @@ class ProductRow extends DataClass implements Insertable<ProductRow> {
|
||||
if (!nullToAbsent || imagePath != null) {
|
||||
map['image_path'] = Variable<String>(imagePath);
|
||||
}
|
||||
if (!nullToAbsent || imageId != null) {
|
||||
map['image_id'] = Variable<String>(imageId);
|
||||
}
|
||||
map['active'] = Variable<bool>(active);
|
||||
return map;
|
||||
}
|
||||
@@ -315,6 +347,9 @@ class ProductRow extends DataClass implements Insertable<ProductRow> {
|
||||
imagePath: imagePath == null && nullToAbsent
|
||||
? const Value.absent()
|
||||
: Value(imagePath),
|
||||
imageId: imageId == null && nullToAbsent
|
||||
? const Value.absent()
|
||||
: Value(imageId),
|
||||
active: Value(active),
|
||||
);
|
||||
}
|
||||
@@ -333,6 +368,7 @@ class ProductRow extends DataClass implements Insertable<ProductRow> {
|
||||
infiniteStock: serializer.fromJson<bool>(json['infiniteStock']),
|
||||
priceInCents: serializer.fromJson<int>(json['priceInCents']),
|
||||
imagePath: serializer.fromJson<String?>(json['imagePath']),
|
||||
imageId: serializer.fromJson<String?>(json['imageId']),
|
||||
active: serializer.fromJson<bool>(json['active']),
|
||||
);
|
||||
}
|
||||
@@ -348,6 +384,7 @@ class ProductRow extends DataClass implements Insertable<ProductRow> {
|
||||
'infiniteStock': serializer.toJson<bool>(infiniteStock),
|
||||
'priceInCents': serializer.toJson<int>(priceInCents),
|
||||
'imagePath': serializer.toJson<String?>(imagePath),
|
||||
'imageId': serializer.toJson<String?>(imageId),
|
||||
'active': serializer.toJson<bool>(active),
|
||||
};
|
||||
}
|
||||
@@ -361,6 +398,7 @@ class ProductRow extends DataClass implements Insertable<ProductRow> {
|
||||
bool? infiniteStock,
|
||||
int? priceInCents,
|
||||
Value<String?> imagePath = const Value.absent(),
|
||||
Value<String?> imageId = const Value.absent(),
|
||||
bool? active,
|
||||
}) => ProductRow(
|
||||
id: id ?? this.id,
|
||||
@@ -371,6 +409,7 @@ class ProductRow extends DataClass implements Insertable<ProductRow> {
|
||||
infiniteStock: infiniteStock ?? this.infiniteStock,
|
||||
priceInCents: priceInCents ?? this.priceInCents,
|
||||
imagePath: imagePath.present ? imagePath.value : this.imagePath,
|
||||
imageId: imageId.present ? imageId.value : this.imageId,
|
||||
active: active ?? this.active,
|
||||
);
|
||||
ProductRow copyWithCompanion(ProductsCompanion data) {
|
||||
@@ -391,6 +430,7 @@ class ProductRow extends DataClass implements Insertable<ProductRow> {
|
||||
? data.priceInCents.value
|
||||
: this.priceInCents,
|
||||
imagePath: data.imagePath.present ? data.imagePath.value : this.imagePath,
|
||||
imageId: data.imageId.present ? data.imageId.value : this.imageId,
|
||||
active: data.active.present ? data.active.value : this.active,
|
||||
);
|
||||
}
|
||||
@@ -406,6 +446,7 @@ class ProductRow extends DataClass implements Insertable<ProductRow> {
|
||||
..write('infiniteStock: $infiniteStock, ')
|
||||
..write('priceInCents: $priceInCents, ')
|
||||
..write('imagePath: $imagePath, ')
|
||||
..write('imageId: $imageId, ')
|
||||
..write('active: $active')
|
||||
..write(')'))
|
||||
.toString();
|
||||
@@ -421,6 +462,7 @@ class ProductRow extends DataClass implements Insertable<ProductRow> {
|
||||
infiniteStock,
|
||||
priceInCents,
|
||||
imagePath,
|
||||
imageId,
|
||||
active,
|
||||
);
|
||||
@override
|
||||
@@ -435,6 +477,7 @@ class ProductRow extends DataClass implements Insertable<ProductRow> {
|
||||
other.infiniteStock == this.infiniteStock &&
|
||||
other.priceInCents == this.priceInCents &&
|
||||
other.imagePath == this.imagePath &&
|
||||
other.imageId == this.imageId &&
|
||||
other.active == this.active);
|
||||
}
|
||||
|
||||
@@ -447,6 +490,7 @@ class ProductsCompanion extends UpdateCompanion<ProductRow> {
|
||||
final Value<bool> infiniteStock;
|
||||
final Value<int> priceInCents;
|
||||
final Value<String?> imagePath;
|
||||
final Value<String?> imageId;
|
||||
final Value<bool> active;
|
||||
final Value<int> rowid;
|
||||
const ProductsCompanion({
|
||||
@@ -458,6 +502,7 @@ class ProductsCompanion extends UpdateCompanion<ProductRow> {
|
||||
this.infiniteStock = const Value.absent(),
|
||||
this.priceInCents = const Value.absent(),
|
||||
this.imagePath = const Value.absent(),
|
||||
this.imageId = const Value.absent(),
|
||||
this.active = const Value.absent(),
|
||||
this.rowid = const Value.absent(),
|
||||
});
|
||||
@@ -470,6 +515,7 @@ class ProductsCompanion extends UpdateCompanion<ProductRow> {
|
||||
this.infiniteStock = const Value.absent(),
|
||||
required int priceInCents,
|
||||
this.imagePath = const Value.absent(),
|
||||
this.imageId = const Value.absent(),
|
||||
this.active = const Value.absent(),
|
||||
this.rowid = const Value.absent(),
|
||||
}) : id = Value(id),
|
||||
@@ -487,6 +533,7 @@ class ProductsCompanion extends UpdateCompanion<ProductRow> {
|
||||
Expression<bool>? infiniteStock,
|
||||
Expression<int>? priceInCents,
|
||||
Expression<String>? imagePath,
|
||||
Expression<String>? imageId,
|
||||
Expression<bool>? active,
|
||||
Expression<int>? rowid,
|
||||
}) {
|
||||
@@ -499,6 +546,7 @@ class ProductsCompanion extends UpdateCompanion<ProductRow> {
|
||||
if (infiniteStock != null) 'infinite_stock': infiniteStock,
|
||||
if (priceInCents != null) 'price_in_cents': priceInCents,
|
||||
if (imagePath != null) 'image_path': imagePath,
|
||||
if (imageId != null) 'image_id': imageId,
|
||||
if (active != null) 'active': active,
|
||||
if (rowid != null) 'rowid': rowid,
|
||||
});
|
||||
@@ -513,6 +561,7 @@ class ProductsCompanion extends UpdateCompanion<ProductRow> {
|
||||
Value<bool>? infiniteStock,
|
||||
Value<int>? priceInCents,
|
||||
Value<String?>? imagePath,
|
||||
Value<String?>? imageId,
|
||||
Value<bool>? active,
|
||||
Value<int>? rowid,
|
||||
}) {
|
||||
@@ -525,6 +574,7 @@ class ProductsCompanion extends UpdateCompanion<ProductRow> {
|
||||
infiniteStock: infiniteStock ?? this.infiniteStock,
|
||||
priceInCents: priceInCents ?? this.priceInCents,
|
||||
imagePath: imagePath ?? this.imagePath,
|
||||
imageId: imageId ?? this.imageId,
|
||||
active: active ?? this.active,
|
||||
rowid: rowid ?? this.rowid,
|
||||
);
|
||||
@@ -557,6 +607,9 @@ class ProductsCompanion extends UpdateCompanion<ProductRow> {
|
||||
if (imagePath.present) {
|
||||
map['image_path'] = Variable<String>(imagePath.value);
|
||||
}
|
||||
if (imageId.present) {
|
||||
map['image_id'] = Variable<String>(imageId.value);
|
||||
}
|
||||
if (active.present) {
|
||||
map['active'] = Variable<bool>(active.value);
|
||||
}
|
||||
@@ -577,6 +630,7 @@ class ProductsCompanion extends UpdateCompanion<ProductRow> {
|
||||
..write('infiniteStock: $infiniteStock, ')
|
||||
..write('priceInCents: $priceInCents, ')
|
||||
..write('imagePath: $imagePath, ')
|
||||
..write('imageId: $imageId, ')
|
||||
..write('active: $active, ')
|
||||
..write('rowid: $rowid')
|
||||
..write(')'))
|
||||
@@ -4447,6 +4501,278 @@ class StockAdjustmentResultsCompanion
|
||||
}
|
||||
}
|
||||
|
||||
class $PendingImageUploadsTable extends PendingImageUploads
|
||||
with TableInfo<$PendingImageUploadsTable, PendingImageUploadRow> {
|
||||
@override
|
||||
final GeneratedDatabase attachedDatabase;
|
||||
final String? _alias;
|
||||
$PendingImageUploadsTable(this.attachedDatabase, [this._alias]);
|
||||
static const VerificationMeta _productIdMeta = const VerificationMeta(
|
||||
'productId',
|
||||
);
|
||||
@override
|
||||
late final GeneratedColumn<String> productId = GeneratedColumn<String>(
|
||||
'product_id',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.string,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
static const VerificationMeta _localPathMeta = const VerificationMeta(
|
||||
'localPath',
|
||||
);
|
||||
@override
|
||||
late final GeneratedColumn<String> localPath = GeneratedColumn<String>(
|
||||
'local_path',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.string,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
static const VerificationMeta _createdAtMeta = const VerificationMeta(
|
||||
'createdAt',
|
||||
);
|
||||
@override
|
||||
late final GeneratedColumn<DateTime> createdAt = GeneratedColumn<DateTime>(
|
||||
'created_at',
|
||||
aliasedName,
|
||||
false,
|
||||
type: DriftSqlType.dateTime,
|
||||
requiredDuringInsert: true,
|
||||
);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [productId, localPath, createdAt];
|
||||
@override
|
||||
String get aliasedName => _alias ?? actualTableName;
|
||||
@override
|
||||
String get actualTableName => $name;
|
||||
static const String $name = 'pending_image_uploads';
|
||||
@override
|
||||
VerificationContext validateIntegrity(
|
||||
Insertable<PendingImageUploadRow> instance, {
|
||||
bool isInserting = false,
|
||||
}) {
|
||||
final context = VerificationContext();
|
||||
final data = instance.toColumns(true);
|
||||
if (data.containsKey('product_id')) {
|
||||
context.handle(
|
||||
_productIdMeta,
|
||||
productId.isAcceptableOrUnknown(data['product_id']!, _productIdMeta),
|
||||
);
|
||||
} else if (isInserting) {
|
||||
context.missing(_productIdMeta);
|
||||
}
|
||||
if (data.containsKey('local_path')) {
|
||||
context.handle(
|
||||
_localPathMeta,
|
||||
localPath.isAcceptableOrUnknown(data['local_path']!, _localPathMeta),
|
||||
);
|
||||
} else if (isInserting) {
|
||||
context.missing(_localPathMeta);
|
||||
}
|
||||
if (data.containsKey('created_at')) {
|
||||
context.handle(
|
||||
_createdAtMeta,
|
||||
createdAt.isAcceptableOrUnknown(data['created_at']!, _createdAtMeta),
|
||||
);
|
||||
} else if (isInserting) {
|
||||
context.missing(_createdAtMeta);
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
@override
|
||||
Set<GeneratedColumn> get $primaryKey => {productId};
|
||||
@override
|
||||
PendingImageUploadRow map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||
final effectivePrefix = tablePrefix != null ? '$tablePrefix.' : '';
|
||||
return PendingImageUploadRow(
|
||||
productId: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}product_id'],
|
||||
)!,
|
||||
localPath: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.string,
|
||||
data['${effectivePrefix}local_path'],
|
||||
)!,
|
||||
createdAt: attachedDatabase.typeMapping.read(
|
||||
DriftSqlType.dateTime,
|
||||
data['${effectivePrefix}created_at'],
|
||||
)!,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
$PendingImageUploadsTable createAlias(String alias) {
|
||||
return $PendingImageUploadsTable(attachedDatabase, alias);
|
||||
}
|
||||
}
|
||||
|
||||
class PendingImageUploadRow extends DataClass
|
||||
implements Insertable<PendingImageUploadRow> {
|
||||
/// One picture per product: a newer one replaces a waiting one.
|
||||
final String productId;
|
||||
final String localPath;
|
||||
final DateTime createdAt;
|
||||
const PendingImageUploadRow({
|
||||
required this.productId,
|
||||
required this.localPath,
|
||||
required this.createdAt,
|
||||
});
|
||||
@override
|
||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, Expression>{};
|
||||
map['product_id'] = Variable<String>(productId);
|
||||
map['local_path'] = Variable<String>(localPath);
|
||||
map['created_at'] = Variable<DateTime>(createdAt);
|
||||
return map;
|
||||
}
|
||||
|
||||
PendingImageUploadsCompanion toCompanion(bool nullToAbsent) {
|
||||
return PendingImageUploadsCompanion(
|
||||
productId: Value(productId),
|
||||
localPath: Value(localPath),
|
||||
createdAt: Value(createdAt),
|
||||
);
|
||||
}
|
||||
|
||||
factory PendingImageUploadRow.fromJson(
|
||||
Map<String, dynamic> json, {
|
||||
ValueSerializer? serializer,
|
||||
}) {
|
||||
serializer ??= driftRuntimeOptions.defaultSerializer;
|
||||
return PendingImageUploadRow(
|
||||
productId: serializer.fromJson<String>(json['productId']),
|
||||
localPath: serializer.fromJson<String>(json['localPath']),
|
||||
createdAt: serializer.fromJson<DateTime>(json['createdAt']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
||||
serializer ??= driftRuntimeOptions.defaultSerializer;
|
||||
return <String, dynamic>{
|
||||
'productId': serializer.toJson<String>(productId),
|
||||
'localPath': serializer.toJson<String>(localPath),
|
||||
'createdAt': serializer.toJson<DateTime>(createdAt),
|
||||
};
|
||||
}
|
||||
|
||||
PendingImageUploadRow copyWith({
|
||||
String? productId,
|
||||
String? localPath,
|
||||
DateTime? createdAt,
|
||||
}) => PendingImageUploadRow(
|
||||
productId: productId ?? this.productId,
|
||||
localPath: localPath ?? this.localPath,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
);
|
||||
PendingImageUploadRow copyWithCompanion(PendingImageUploadsCompanion data) {
|
||||
return PendingImageUploadRow(
|
||||
productId: data.productId.present ? data.productId.value : this.productId,
|
||||
localPath: data.localPath.present ? data.localPath.value : this.localPath,
|
||||
createdAt: data.createdAt.present ? data.createdAt.value : this.createdAt,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return (StringBuffer('PendingImageUploadRow(')
|
||||
..write('productId: $productId, ')
|
||||
..write('localPath: $localPath, ')
|
||||
..write('createdAt: $createdAt')
|
||||
..write(')'))
|
||||
.toString();
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(productId, localPath, createdAt);
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
(other is PendingImageUploadRow &&
|
||||
other.productId == this.productId &&
|
||||
other.localPath == this.localPath &&
|
||||
other.createdAt == this.createdAt);
|
||||
}
|
||||
|
||||
class PendingImageUploadsCompanion
|
||||
extends UpdateCompanion<PendingImageUploadRow> {
|
||||
final Value<String> productId;
|
||||
final Value<String> localPath;
|
||||
final Value<DateTime> createdAt;
|
||||
final Value<int> rowid;
|
||||
const PendingImageUploadsCompanion({
|
||||
this.productId = const Value.absent(),
|
||||
this.localPath = const Value.absent(),
|
||||
this.createdAt = const Value.absent(),
|
||||
this.rowid = const Value.absent(),
|
||||
});
|
||||
PendingImageUploadsCompanion.insert({
|
||||
required String productId,
|
||||
required String localPath,
|
||||
required DateTime createdAt,
|
||||
this.rowid = const Value.absent(),
|
||||
}) : productId = Value(productId),
|
||||
localPath = Value(localPath),
|
||||
createdAt = Value(createdAt);
|
||||
static Insertable<PendingImageUploadRow> custom({
|
||||
Expression<String>? productId,
|
||||
Expression<String>? localPath,
|
||||
Expression<DateTime>? createdAt,
|
||||
Expression<int>? rowid,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (productId != null) 'product_id': productId,
|
||||
if (localPath != null) 'local_path': localPath,
|
||||
if (createdAt != null) 'created_at': createdAt,
|
||||
if (rowid != null) 'rowid': rowid,
|
||||
});
|
||||
}
|
||||
|
||||
PendingImageUploadsCompanion copyWith({
|
||||
Value<String>? productId,
|
||||
Value<String>? localPath,
|
||||
Value<DateTime>? createdAt,
|
||||
Value<int>? rowid,
|
||||
}) {
|
||||
return PendingImageUploadsCompanion(
|
||||
productId: productId ?? this.productId,
|
||||
localPath: localPath ?? this.localPath,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
rowid: rowid ?? this.rowid,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, Expression>{};
|
||||
if (productId.present) {
|
||||
map['product_id'] = Variable<String>(productId.value);
|
||||
}
|
||||
if (localPath.present) {
|
||||
map['local_path'] = Variable<String>(localPath.value);
|
||||
}
|
||||
if (createdAt.present) {
|
||||
map['created_at'] = Variable<DateTime>(createdAt.value);
|
||||
}
|
||||
if (rowid.present) {
|
||||
map['rowid'] = Variable<int>(rowid.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return (StringBuffer('PendingImageUploadsCompanion(')
|
||||
..write('productId: $productId, ')
|
||||
..write('localPath: $localPath, ')
|
||||
..write('createdAt: $createdAt, ')
|
||||
..write('rowid: $rowid')
|
||||
..write(')'))
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _$AppDatabase extends GeneratedDatabase {
|
||||
_$AppDatabase(QueryExecutor e) : super(e);
|
||||
$AppDatabaseManager get managers => $AppDatabaseManager(this);
|
||||
@@ -4469,6 +4795,8 @@ abstract class _$AppDatabase extends GeneratedDatabase {
|
||||
late final $TabEventsTable tabEvents = $TabEventsTable(this);
|
||||
late final $StockAdjustmentResultsTable stockAdjustmentResults =
|
||||
$StockAdjustmentResultsTable(this);
|
||||
late final $PendingImageUploadsTable pendingImageUploads =
|
||||
$PendingImageUploadsTable(this);
|
||||
@override
|
||||
Iterable<TableInfo<Table, Object?>> get allTables =>
|
||||
allSchemaEntities.whereType<TableInfo<Table, Object?>>();
|
||||
@@ -4485,6 +4813,7 @@ abstract class _$AppDatabase extends GeneratedDatabase {
|
||||
processedRemoteCommands,
|
||||
tabEvents,
|
||||
stockAdjustmentResults,
|
||||
pendingImageUploads,
|
||||
];
|
||||
@override
|
||||
StreamQueryUpdateRules get streamUpdateRules => const StreamQueryUpdateRules([
|
||||
@@ -4515,6 +4844,7 @@ typedef $$ProductsTableCreateCompanionBuilder =
|
||||
Value<bool> infiniteStock,
|
||||
required int priceInCents,
|
||||
Value<String?> imagePath,
|
||||
Value<String?> imageId,
|
||||
Value<bool> active,
|
||||
Value<int> rowid,
|
||||
});
|
||||
@@ -4528,6 +4858,7 @@ typedef $$ProductsTableUpdateCompanionBuilder =
|
||||
Value<bool> infiniteStock,
|
||||
Value<int> priceInCents,
|
||||
Value<String?> imagePath,
|
||||
Value<String?> imageId,
|
||||
Value<bool> active,
|
||||
Value<int> rowid,
|
||||
});
|
||||
@@ -4604,6 +4935,11 @@ class $$ProductsTableFilterComposer
|
||||
builder: (column) => ColumnFilters(column),
|
||||
);
|
||||
|
||||
ColumnFilters<String> get imageId => $composableBuilder(
|
||||
column: $table.imageId,
|
||||
builder: (column) => ColumnFilters(column),
|
||||
);
|
||||
|
||||
ColumnFilters<bool> get active => $composableBuilder(
|
||||
column: $table.active,
|
||||
builder: (column) => ColumnFilters(column),
|
||||
@@ -4684,6 +5020,11 @@ class $$ProductsTableOrderingComposer
|
||||
builder: (column) => ColumnOrderings(column),
|
||||
);
|
||||
|
||||
ColumnOrderings<String> get imageId => $composableBuilder(
|
||||
column: $table.imageId,
|
||||
builder: (column) => ColumnOrderings(column),
|
||||
);
|
||||
|
||||
ColumnOrderings<bool> get active => $composableBuilder(
|
||||
column: $table.active,
|
||||
builder: (column) => ColumnOrderings(column),
|
||||
@@ -4731,6 +5072,9 @@ class $$ProductsTableAnnotationComposer
|
||||
GeneratedColumn<String> get imagePath =>
|
||||
$composableBuilder(column: $table.imagePath, builder: (column) => column);
|
||||
|
||||
GeneratedColumn<String> get imageId =>
|
||||
$composableBuilder(column: $table.imageId, builder: (column) => column);
|
||||
|
||||
GeneratedColumn<bool> get active =>
|
||||
$composableBuilder(column: $table.active, builder: (column) => column);
|
||||
|
||||
@@ -4796,6 +5140,7 @@ class $$ProductsTableTableManager
|
||||
Value<bool> infiniteStock = const Value.absent(),
|
||||
Value<int> priceInCents = const Value.absent(),
|
||||
Value<String?> imagePath = const Value.absent(),
|
||||
Value<String?> imageId = const Value.absent(),
|
||||
Value<bool> active = const Value.absent(),
|
||||
Value<int> rowid = const Value.absent(),
|
||||
}) => ProductsCompanion(
|
||||
@@ -4807,6 +5152,7 @@ class $$ProductsTableTableManager
|
||||
infiniteStock: infiniteStock,
|
||||
priceInCents: priceInCents,
|
||||
imagePath: imagePath,
|
||||
imageId: imageId,
|
||||
active: active,
|
||||
rowid: rowid,
|
||||
),
|
||||
@@ -4820,6 +5166,7 @@ class $$ProductsTableTableManager
|
||||
Value<bool> infiniteStock = const Value.absent(),
|
||||
required int priceInCents,
|
||||
Value<String?> imagePath = const Value.absent(),
|
||||
Value<String?> imageId = const Value.absent(),
|
||||
Value<bool> active = const Value.absent(),
|
||||
Value<int> rowid = const Value.absent(),
|
||||
}) => ProductsCompanion.insert(
|
||||
@@ -4831,6 +5178,7 @@ class $$ProductsTableTableManager
|
||||
infiniteStock: infiniteStock,
|
||||
priceInCents: priceInCents,
|
||||
imagePath: imagePath,
|
||||
imageId: imageId,
|
||||
active: active,
|
||||
rowid: rowid,
|
||||
),
|
||||
@@ -7549,6 +7897,184 @@ typedef $$StockAdjustmentResultsTableProcessedTableManager =
|
||||
StockAdjustmentResultRow,
|
||||
PrefetchHooks Function()
|
||||
>;
|
||||
typedef $$PendingImageUploadsTableCreateCompanionBuilder =
|
||||
PendingImageUploadsCompanion Function({
|
||||
required String productId,
|
||||
required String localPath,
|
||||
required DateTime createdAt,
|
||||
Value<int> rowid,
|
||||
});
|
||||
typedef $$PendingImageUploadsTableUpdateCompanionBuilder =
|
||||
PendingImageUploadsCompanion Function({
|
||||
Value<String> productId,
|
||||
Value<String> localPath,
|
||||
Value<DateTime> createdAt,
|
||||
Value<int> rowid,
|
||||
});
|
||||
|
||||
class $$PendingImageUploadsTableFilterComposer
|
||||
extends Composer<_$AppDatabase, $PendingImageUploadsTable> {
|
||||
$$PendingImageUploadsTableFilterComposer({
|
||||
required super.$db,
|
||||
required super.$table,
|
||||
super.joinBuilder,
|
||||
super.$addJoinBuilderToRootComposer,
|
||||
super.$removeJoinBuilderFromRootComposer,
|
||||
});
|
||||
ColumnFilters<String> get productId => $composableBuilder(
|
||||
column: $table.productId,
|
||||
builder: (column) => ColumnFilters(column),
|
||||
);
|
||||
|
||||
ColumnFilters<String> get localPath => $composableBuilder(
|
||||
column: $table.localPath,
|
||||
builder: (column) => ColumnFilters(column),
|
||||
);
|
||||
|
||||
ColumnFilters<DateTime> get createdAt => $composableBuilder(
|
||||
column: $table.createdAt,
|
||||
builder: (column) => ColumnFilters(column),
|
||||
);
|
||||
}
|
||||
|
||||
class $$PendingImageUploadsTableOrderingComposer
|
||||
extends Composer<_$AppDatabase, $PendingImageUploadsTable> {
|
||||
$$PendingImageUploadsTableOrderingComposer({
|
||||
required super.$db,
|
||||
required super.$table,
|
||||
super.joinBuilder,
|
||||
super.$addJoinBuilderToRootComposer,
|
||||
super.$removeJoinBuilderFromRootComposer,
|
||||
});
|
||||
ColumnOrderings<String> get productId => $composableBuilder(
|
||||
column: $table.productId,
|
||||
builder: (column) => ColumnOrderings(column),
|
||||
);
|
||||
|
||||
ColumnOrderings<String> get localPath => $composableBuilder(
|
||||
column: $table.localPath,
|
||||
builder: (column) => ColumnOrderings(column),
|
||||
);
|
||||
|
||||
ColumnOrderings<DateTime> get createdAt => $composableBuilder(
|
||||
column: $table.createdAt,
|
||||
builder: (column) => ColumnOrderings(column),
|
||||
);
|
||||
}
|
||||
|
||||
class $$PendingImageUploadsTableAnnotationComposer
|
||||
extends Composer<_$AppDatabase, $PendingImageUploadsTable> {
|
||||
$$PendingImageUploadsTableAnnotationComposer({
|
||||
required super.$db,
|
||||
required super.$table,
|
||||
super.joinBuilder,
|
||||
super.$addJoinBuilderToRootComposer,
|
||||
super.$removeJoinBuilderFromRootComposer,
|
||||
});
|
||||
GeneratedColumn<String> get productId =>
|
||||
$composableBuilder(column: $table.productId, builder: (column) => column);
|
||||
|
||||
GeneratedColumn<String> get localPath =>
|
||||
$composableBuilder(column: $table.localPath, builder: (column) => column);
|
||||
|
||||
GeneratedColumn<DateTime> get createdAt =>
|
||||
$composableBuilder(column: $table.createdAt, builder: (column) => column);
|
||||
}
|
||||
|
||||
class $$PendingImageUploadsTableTableManager
|
||||
extends
|
||||
RootTableManager<
|
||||
_$AppDatabase,
|
||||
$PendingImageUploadsTable,
|
||||
PendingImageUploadRow,
|
||||
$$PendingImageUploadsTableFilterComposer,
|
||||
$$PendingImageUploadsTableOrderingComposer,
|
||||
$$PendingImageUploadsTableAnnotationComposer,
|
||||
$$PendingImageUploadsTableCreateCompanionBuilder,
|
||||
$$PendingImageUploadsTableUpdateCompanionBuilder,
|
||||
(
|
||||
PendingImageUploadRow,
|
||||
BaseReferences<
|
||||
_$AppDatabase,
|
||||
$PendingImageUploadsTable,
|
||||
PendingImageUploadRow
|
||||
>,
|
||||
),
|
||||
PendingImageUploadRow,
|
||||
PrefetchHooks Function()
|
||||
> {
|
||||
$$PendingImageUploadsTableTableManager(
|
||||
_$AppDatabase db,
|
||||
$PendingImageUploadsTable table,
|
||||
) : super(
|
||||
TableManagerState(
|
||||
db: db,
|
||||
table: table,
|
||||
createFilteringComposer: () =>
|
||||
$$PendingImageUploadsTableFilterComposer($db: db, $table: table),
|
||||
createOrderingComposer: () =>
|
||||
$$PendingImageUploadsTableOrderingComposer(
|
||||
$db: db,
|
||||
$table: table,
|
||||
),
|
||||
createComputedFieldComposer: () =>
|
||||
$$PendingImageUploadsTableAnnotationComposer(
|
||||
$db: db,
|
||||
$table: table,
|
||||
),
|
||||
updateCompanionCallback:
|
||||
({
|
||||
Value<String> productId = const Value.absent(),
|
||||
Value<String> localPath = const Value.absent(),
|
||||
Value<DateTime> createdAt = const Value.absent(),
|
||||
Value<int> rowid = const Value.absent(),
|
||||
}) => PendingImageUploadsCompanion(
|
||||
productId: productId,
|
||||
localPath: localPath,
|
||||
createdAt: createdAt,
|
||||
rowid: rowid,
|
||||
),
|
||||
createCompanionCallback:
|
||||
({
|
||||
required String productId,
|
||||
required String localPath,
|
||||
required DateTime createdAt,
|
||||
Value<int> rowid = const Value.absent(),
|
||||
}) => PendingImageUploadsCompanion.insert(
|
||||
productId: productId,
|
||||
localPath: localPath,
|
||||
createdAt: createdAt,
|
||||
rowid: rowid,
|
||||
),
|
||||
withReferenceMapper: (p0) => p0
|
||||
.map((e) => (e.readTable(table), BaseReferences(db, table, e)))
|
||||
.toList(),
|
||||
prefetchHooksCallback: null,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
typedef $$PendingImageUploadsTableProcessedTableManager =
|
||||
ProcessedTableManager<
|
||||
_$AppDatabase,
|
||||
$PendingImageUploadsTable,
|
||||
PendingImageUploadRow,
|
||||
$$PendingImageUploadsTableFilterComposer,
|
||||
$$PendingImageUploadsTableOrderingComposer,
|
||||
$$PendingImageUploadsTableAnnotationComposer,
|
||||
$$PendingImageUploadsTableCreateCompanionBuilder,
|
||||
$$PendingImageUploadsTableUpdateCompanionBuilder,
|
||||
(
|
||||
PendingImageUploadRow,
|
||||
BaseReferences<
|
||||
_$AppDatabase,
|
||||
$PendingImageUploadsTable,
|
||||
PendingImageUploadRow
|
||||
>,
|
||||
),
|
||||
PendingImageUploadRow,
|
||||
PrefetchHooks Function()
|
||||
>;
|
||||
|
||||
class $AppDatabaseManager {
|
||||
final _$AppDatabase _db;
|
||||
@@ -7581,4 +8107,6 @@ class $AppDatabaseManager {
|
||||
_db,
|
||||
_db.stockAdjustmentResults,
|
||||
);
|
||||
$$PendingImageUploadsTableTableManager get pendingImageUploads =>
|
||||
$$PendingImageUploadsTableTableManager(_db, _db.pendingImageUploads);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user