- import '../database.dart';
- class ScontiDao {
- final AppDatabase db;
- ScontiDao(this.db);
- Future<Sconto?> findByCod(String code) {
- return (db.select(db.sconti)..where((t) => t.codSconto.equals(code)))
- .getSingleOrNull();
- }
- Future<Sconto?> findById(int id) {
- return (db.select(db.sconti)..where((t) => t.idSconto.equals(id)))
- .getSingleOrNull();
- }
- }
|