package com.taf.mobilepos.data.db;

import androidx.annotation.NonNull;
import androidx.room.DatabaseConfiguration;
import androidx.room.InvalidationTracker;
import androidx.room.RoomDatabase;
import androidx.room.RoomOpenHelper;
import androidx.room.migration.AutoMigrationSpec;
import androidx.room.migration.Migration;
import androidx.room.util.DBUtil;
import androidx.room.util.TableInfo;
import androidx.sqlite.db.SupportSQLiteDatabase;
import androidx.sqlite.db.SupportSQLiteOpenHelper;
import com.taf.mobilepos.data.db.dao.CartDao;
import com.taf.mobilepos.data.db.dao.CartDao_Impl;
import com.taf.mobilepos.data.db.dao.CustomerDao;
import com.taf.mobilepos.data.db.dao.CustomerDao_Impl;
import com.taf.mobilepos.data.db.dao.DeliveryDao;
import com.taf.mobilepos.data.db.dao.DeliveryDao_Impl;
import com.taf.mobilepos.data.db.dao.ProductCategoryDao;
import com.taf.mobilepos.data.db.dao.ProductCategoryDao_Impl;
import com.taf.mobilepos.data.db.dao.ProductDao;
import com.taf.mobilepos.data.db.dao.ProductDao_Impl;
import com.taf.mobilepos.data.db.dao.SalesReceiptDao;
import com.taf.mobilepos.data.db.dao.SalesReceiptDao_Impl;
import java.lang.Class;
import java.lang.Override;
import java.lang.String;
import java.lang.SuppressWarnings;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.annotation.processing.Generated;

@Generated("androidx.room.RoomProcessor")
@SuppressWarnings({"unchecked", "deprecation"})
public final class PosDatabase_Impl extends PosDatabase {
  private volatile ProductDao _productDao;

  private volatile ProductCategoryDao _productCategoryDao;

  private volatile CartDao _cartDao;

  private volatile SalesReceiptDao _salesReceiptDao;

  private volatile CustomerDao _customerDao;

  private volatile DeliveryDao _deliveryDao;

  @Override
  @NonNull
  protected SupportSQLiteOpenHelper createOpenHelper(@NonNull final DatabaseConfiguration config) {
    final SupportSQLiteOpenHelper.Callback _openCallback = new RoomOpenHelper(config, new RoomOpenHelper.Delegate(4) {
      @Override
      public void createAllTables(@NonNull final SupportSQLiteDatabase db) {
        db.execSQL("CREATE TABLE IF NOT EXISTS `products` (`product_id` TEXT NOT NULL, `name` TEXT NOT NULL, `description` TEXT, `price` REAL NOT NULL, `cost_price` REAL, `quantity` INTEGER NOT NULL, `org_id` TEXT NOT NULL, `barcode` TEXT, `category_id` TEXT, `brand` TEXT, `product_number` TEXT, `tax_rates` TEXT, `size` TEXT, `base_unit` TEXT, `master_unit` TEXT, `units_per_master` INTEGER, `master_unit_2` TEXT, `units_per_master_2` INTEGER, `isdeleted` INTEGER NOT NULL, `updatedat` TEXT, `image_url` TEXT, PRIMARY KEY(`product_id`))");
        db.execSQL("CREATE INDEX IF NOT EXISTS `index_products_barcode` ON `products` (`barcode`)");
        db.execSQL("CREATE INDEX IF NOT EXISTS `index_products_name` ON `products` (`name`)");
        db.execSQL("CREATE INDEX IF NOT EXISTS `index_products_category_id` ON `products` (`category_id`)");
        db.execSQL("CREATE TABLE IF NOT EXISTS `product_categories` (`category_id` TEXT NOT NULL, `name` TEXT NOT NULL, `description` TEXT, `org_id` TEXT NOT NULL, `parent_category_id` TEXT, `isdeleted` INTEGER NOT NULL, `updatedat` TEXT, PRIMARY KEY(`category_id`))");
        db.execSQL("CREATE INDEX IF NOT EXISTS `index_product_categories_name` ON `product_categories` (`name`)");
        db.execSQL("CREATE TABLE IF NOT EXISTS `cart_items` (`cart_item_id` TEXT NOT NULL, `product_id` TEXT NOT NULL, `product_name` TEXT NOT NULL, `quantity` INTEGER NOT NULL, `unit_price` REAL NOT NULL, `total_price` REAL NOT NULL, `barcode` TEXT, `vat_rate` REAL NOT NULL, `vat_label` TEXT, `created_at` INTEGER NOT NULL, PRIMARY KEY(`cart_item_id`), FOREIGN KEY(`product_id`) REFERENCES `products`(`product_id`) ON UPDATE NO ACTION ON DELETE CASCADE )");
        db.execSQL("CREATE INDEX IF NOT EXISTS `index_cart_items_product_id` ON `cart_items` (`product_id`)");
        db.execSQL("CREATE TABLE IF NOT EXISTS `sales_receipts` (`sales_receipt_id` TEXT NOT NULL, `org_id` TEXT NOT NULL, `user_id` TEXT NOT NULL, `customer_id` TEXT, `total_amount` REAL NOT NULL, `subtotal` REAL NOT NULL, `tax_amount` REAL NOT NULL, `line_items` TEXT NOT NULL, `payments` TEXT NOT NULL, `taxcore_data` TEXT, `pendingSync` INTEGER NOT NULL, `created_at` INTEGER NOT NULL, `synced_at` INTEGER, `isDeleted` INTEGER NOT NULL, PRIMARY KEY(`sales_receipt_id`))");
        db.execSQL("CREATE INDEX IF NOT EXISTS `index_sales_receipts_pendingSync` ON `sales_receipts` (`pendingSync`)");
        db.execSQL("CREATE INDEX IF NOT EXISTS `index_sales_receipts_created_at` ON `sales_receipts` (`created_at`)");
        db.execSQL("CREATE TABLE IF NOT EXISTS `customers` (`customer_id` TEXT NOT NULL, `name` TEXT NOT NULL, `email` TEXT, `phone` TEXT, `tin` TEXT, `balance` REAL NOT NULL, `org_id` TEXT NOT NULL, `isDeleted` INTEGER NOT NULL, `updatedAt` TEXT NOT NULL, PRIMARY KEY(`customer_id`))");
        db.execSQL("CREATE INDEX IF NOT EXISTS `index_customers_name` ON `customers` (`name`)");
        db.execSQL("CREATE INDEX IF NOT EXISTS `index_customers_email` ON `customers` (`email`)");
        db.execSQL("CREATE INDEX IF NOT EXISTS `index_customers_phone` ON `customers` (`phone`)");
        db.execSQL("CREATE TABLE IF NOT EXISTS `deliveries` (`dispatch_note_id` TEXT NOT NULL, `dispatch_number` TEXT NOT NULL, `driver_id` TEXT NOT NULL, `customer_name` TEXT NOT NULL, `customer_address` TEXT, `customer_phone` TEXT, `items_count` INTEGER NOT NULL, `items` TEXT NOT NULL, `status` TEXT NOT NULL, `latitude` REAL, `longitude` REAL, `delivery_latitude` REAL, `delivery_longitude` REAL, `dispatch_date` TEXT NOT NULL, `delivered_at` INTEGER, `pendingSync` INTEGER NOT NULL, `last_updated` INTEGER NOT NULL, `isDeleted` INTEGER NOT NULL, PRIMARY KEY(`dispatch_note_id`))");
        db.execSQL("CREATE INDEX IF NOT EXISTS `index_deliveries_status` ON `deliveries` (`status`)");
        db.execSQL("CREATE INDEX IF NOT EXISTS `index_deliveries_driver_id` ON `deliveries` (`driver_id`)");
        db.execSQL("CREATE INDEX IF NOT EXISTS `index_deliveries_pendingSync` ON `deliveries` (`pendingSync`)");
        db.execSQL("CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)");
        db.execSQL("INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '557d7eff3c714dd40b4d5a6ab69fadf3')");
      }

      @Override
      public void dropAllTables(@NonNull final SupportSQLiteDatabase db) {
        db.execSQL("DROP TABLE IF EXISTS `products`");
        db.execSQL("DROP TABLE IF EXISTS `product_categories`");
        db.execSQL("DROP TABLE IF EXISTS `cart_items`");
        db.execSQL("DROP TABLE IF EXISTS `sales_receipts`");
        db.execSQL("DROP TABLE IF EXISTS `customers`");
        db.execSQL("DROP TABLE IF EXISTS `deliveries`");
        final List<? extends RoomDatabase.Callback> _callbacks = mCallbacks;
        if (_callbacks != null) {
          for (RoomDatabase.Callback _callback : _callbacks) {
            _callback.onDestructiveMigration(db);
          }
        }
      }

      @Override
      public void onCreate(@NonNull final SupportSQLiteDatabase db) {
        final List<? extends RoomDatabase.Callback> _callbacks = mCallbacks;
        if (_callbacks != null) {
          for (RoomDatabase.Callback _callback : _callbacks) {
            _callback.onCreate(db);
          }
        }
      }

      @Override
      public void onOpen(@NonNull final SupportSQLiteDatabase db) {
        mDatabase = db;
        db.execSQL("PRAGMA foreign_keys = ON");
        internalInitInvalidationTracker(db);
        final List<? extends RoomDatabase.Callback> _callbacks = mCallbacks;
        if (_callbacks != null) {
          for (RoomDatabase.Callback _callback : _callbacks) {
            _callback.onOpen(db);
          }
        }
      }

      @Override
      public void onPreMigrate(@NonNull final SupportSQLiteDatabase db) {
        DBUtil.dropFtsSyncTriggers(db);
      }

      @Override
      public void onPostMigrate(@NonNull final SupportSQLiteDatabase db) {
      }

      @Override
      @NonNull
      public RoomOpenHelper.ValidationResult onValidateSchema(
          @NonNull final SupportSQLiteDatabase db) {
        final HashMap<String, TableInfo.Column> _columnsProducts = new HashMap<String, TableInfo.Column>(21);
        _columnsProducts.put("product_id", new TableInfo.Column("product_id", "TEXT", true, 1, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("name", new TableInfo.Column("name", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("description", new TableInfo.Column("description", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("price", new TableInfo.Column("price", "REAL", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("cost_price", new TableInfo.Column("cost_price", "REAL", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("quantity", new TableInfo.Column("quantity", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("org_id", new TableInfo.Column("org_id", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("barcode", new TableInfo.Column("barcode", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("category_id", new TableInfo.Column("category_id", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("brand", new TableInfo.Column("brand", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("product_number", new TableInfo.Column("product_number", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("tax_rates", new TableInfo.Column("tax_rates", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("size", new TableInfo.Column("size", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("base_unit", new TableInfo.Column("base_unit", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("master_unit", new TableInfo.Column("master_unit", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("units_per_master", new TableInfo.Column("units_per_master", "INTEGER", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("master_unit_2", new TableInfo.Column("master_unit_2", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("units_per_master_2", new TableInfo.Column("units_per_master_2", "INTEGER", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("isdeleted", new TableInfo.Column("isdeleted", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("updatedat", new TableInfo.Column("updatedat", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProducts.put("image_url", new TableInfo.Column("image_url", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        final HashSet<TableInfo.ForeignKey> _foreignKeysProducts = new HashSet<TableInfo.ForeignKey>(0);
        final HashSet<TableInfo.Index> _indicesProducts = new HashSet<TableInfo.Index>(3);
        _indicesProducts.add(new TableInfo.Index("index_products_barcode", false, Arrays.asList("barcode"), Arrays.asList("ASC")));
        _indicesProducts.add(new TableInfo.Index("index_products_name", false, Arrays.asList("name"), Arrays.asList("ASC")));
        _indicesProducts.add(new TableInfo.Index("index_products_category_id", false, Arrays.asList("category_id"), Arrays.asList("ASC")));
        final TableInfo _infoProducts = new TableInfo("products", _columnsProducts, _foreignKeysProducts, _indicesProducts);
        final TableInfo _existingProducts = TableInfo.read(db, "products");
        if (!_infoProducts.equals(_existingProducts)) {
          return new RoomOpenHelper.ValidationResult(false, "products(com.taf.mobilepos.data.db.entities.Product).\n"
                  + " Expected:\n" + _infoProducts + "\n"
                  + " Found:\n" + _existingProducts);
        }
        final HashMap<String, TableInfo.Column> _columnsProductCategories = new HashMap<String, TableInfo.Column>(7);
        _columnsProductCategories.put("category_id", new TableInfo.Column("category_id", "TEXT", true, 1, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProductCategories.put("name", new TableInfo.Column("name", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProductCategories.put("description", new TableInfo.Column("description", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProductCategories.put("org_id", new TableInfo.Column("org_id", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProductCategories.put("parent_category_id", new TableInfo.Column("parent_category_id", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProductCategories.put("isdeleted", new TableInfo.Column("isdeleted", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsProductCategories.put("updatedat", new TableInfo.Column("updatedat", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        final HashSet<TableInfo.ForeignKey> _foreignKeysProductCategories = new HashSet<TableInfo.ForeignKey>(0);
        final HashSet<TableInfo.Index> _indicesProductCategories = new HashSet<TableInfo.Index>(1);
        _indicesProductCategories.add(new TableInfo.Index("index_product_categories_name", false, Arrays.asList("name"), Arrays.asList("ASC")));
        final TableInfo _infoProductCategories = new TableInfo("product_categories", _columnsProductCategories, _foreignKeysProductCategories, _indicesProductCategories);
        final TableInfo _existingProductCategories = TableInfo.read(db, "product_categories");
        if (!_infoProductCategories.equals(_existingProductCategories)) {
          return new RoomOpenHelper.ValidationResult(false, "product_categories(com.taf.mobilepos.data.db.entities.ProductCategory).\n"
                  + " Expected:\n" + _infoProductCategories + "\n"
                  + " Found:\n" + _existingProductCategories);
        }
        final HashMap<String, TableInfo.Column> _columnsCartItems = new HashMap<String, TableInfo.Column>(10);
        _columnsCartItems.put("cart_item_id", new TableInfo.Column("cart_item_id", "TEXT", true, 1, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsCartItems.put("product_id", new TableInfo.Column("product_id", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsCartItems.put("product_name", new TableInfo.Column("product_name", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsCartItems.put("quantity", new TableInfo.Column("quantity", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsCartItems.put("unit_price", new TableInfo.Column("unit_price", "REAL", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsCartItems.put("total_price", new TableInfo.Column("total_price", "REAL", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsCartItems.put("barcode", new TableInfo.Column("barcode", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsCartItems.put("vat_rate", new TableInfo.Column("vat_rate", "REAL", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsCartItems.put("vat_label", new TableInfo.Column("vat_label", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsCartItems.put("created_at", new TableInfo.Column("created_at", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        final HashSet<TableInfo.ForeignKey> _foreignKeysCartItems = new HashSet<TableInfo.ForeignKey>(1);
        _foreignKeysCartItems.add(new TableInfo.ForeignKey("products", "CASCADE", "NO ACTION", Arrays.asList("product_id"), Arrays.asList("product_id")));
        final HashSet<TableInfo.Index> _indicesCartItems = new HashSet<TableInfo.Index>(1);
        _indicesCartItems.add(new TableInfo.Index("index_cart_items_product_id", false, Arrays.asList("product_id"), Arrays.asList("ASC")));
        final TableInfo _infoCartItems = new TableInfo("cart_items", _columnsCartItems, _foreignKeysCartItems, _indicesCartItems);
        final TableInfo _existingCartItems = TableInfo.read(db, "cart_items");
        if (!_infoCartItems.equals(_existingCartItems)) {
          return new RoomOpenHelper.ValidationResult(false, "cart_items(com.taf.mobilepos.data.db.entities.CartItem).\n"
                  + " Expected:\n" + _infoCartItems + "\n"
                  + " Found:\n" + _existingCartItems);
        }
        final HashMap<String, TableInfo.Column> _columnsSalesReceipts = new HashMap<String, TableInfo.Column>(14);
        _columnsSalesReceipts.put("sales_receipt_id", new TableInfo.Column("sales_receipt_id", "TEXT", true, 1, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsSalesReceipts.put("org_id", new TableInfo.Column("org_id", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsSalesReceipts.put("user_id", new TableInfo.Column("user_id", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsSalesReceipts.put("customer_id", new TableInfo.Column("customer_id", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsSalesReceipts.put("total_amount", new TableInfo.Column("total_amount", "REAL", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsSalesReceipts.put("subtotal", new TableInfo.Column("subtotal", "REAL", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsSalesReceipts.put("tax_amount", new TableInfo.Column("tax_amount", "REAL", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsSalesReceipts.put("line_items", new TableInfo.Column("line_items", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsSalesReceipts.put("payments", new TableInfo.Column("payments", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsSalesReceipts.put("taxcore_data", new TableInfo.Column("taxcore_data", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsSalesReceipts.put("pendingSync", new TableInfo.Column("pendingSync", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsSalesReceipts.put("created_at", new TableInfo.Column("created_at", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsSalesReceipts.put("synced_at", new TableInfo.Column("synced_at", "INTEGER", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsSalesReceipts.put("isDeleted", new TableInfo.Column("isDeleted", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        final HashSet<TableInfo.ForeignKey> _foreignKeysSalesReceipts = new HashSet<TableInfo.ForeignKey>(0);
        final HashSet<TableInfo.Index> _indicesSalesReceipts = new HashSet<TableInfo.Index>(2);
        _indicesSalesReceipts.add(new TableInfo.Index("index_sales_receipts_pendingSync", false, Arrays.asList("pendingSync"), Arrays.asList("ASC")));
        _indicesSalesReceipts.add(new TableInfo.Index("index_sales_receipts_created_at", false, Arrays.asList("created_at"), Arrays.asList("ASC")));
        final TableInfo _infoSalesReceipts = new TableInfo("sales_receipts", _columnsSalesReceipts, _foreignKeysSalesReceipts, _indicesSalesReceipts);
        final TableInfo _existingSalesReceipts = TableInfo.read(db, "sales_receipts");
        if (!_infoSalesReceipts.equals(_existingSalesReceipts)) {
          return new RoomOpenHelper.ValidationResult(false, "sales_receipts(com.taf.mobilepos.data.db.entities.SalesReceipt).\n"
                  + " Expected:\n" + _infoSalesReceipts + "\n"
                  + " Found:\n" + _existingSalesReceipts);
        }
        final HashMap<String, TableInfo.Column> _columnsCustomers = new HashMap<String, TableInfo.Column>(9);
        _columnsCustomers.put("customer_id", new TableInfo.Column("customer_id", "TEXT", true, 1, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsCustomers.put("name", new TableInfo.Column("name", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsCustomers.put("email", new TableInfo.Column("email", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsCustomers.put("phone", new TableInfo.Column("phone", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsCustomers.put("tin", new TableInfo.Column("tin", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsCustomers.put("balance", new TableInfo.Column("balance", "REAL", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsCustomers.put("org_id", new TableInfo.Column("org_id", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsCustomers.put("isDeleted", new TableInfo.Column("isDeleted", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsCustomers.put("updatedAt", new TableInfo.Column("updatedAt", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        final HashSet<TableInfo.ForeignKey> _foreignKeysCustomers = new HashSet<TableInfo.ForeignKey>(0);
        final HashSet<TableInfo.Index> _indicesCustomers = new HashSet<TableInfo.Index>(3);
        _indicesCustomers.add(new TableInfo.Index("index_customers_name", false, Arrays.asList("name"), Arrays.asList("ASC")));
        _indicesCustomers.add(new TableInfo.Index("index_customers_email", false, Arrays.asList("email"), Arrays.asList("ASC")));
        _indicesCustomers.add(new TableInfo.Index("index_customers_phone", false, Arrays.asList("phone"), Arrays.asList("ASC")));
        final TableInfo _infoCustomers = new TableInfo("customers", _columnsCustomers, _foreignKeysCustomers, _indicesCustomers);
        final TableInfo _existingCustomers = TableInfo.read(db, "customers");
        if (!_infoCustomers.equals(_existingCustomers)) {
          return new RoomOpenHelper.ValidationResult(false, "customers(com.taf.mobilepos.data.db.entities.Customer).\n"
                  + " Expected:\n" + _infoCustomers + "\n"
                  + " Found:\n" + _existingCustomers);
        }
        final HashMap<String, TableInfo.Column> _columnsDeliveries = new HashMap<String, TableInfo.Column>(18);
        _columnsDeliveries.put("dispatch_note_id", new TableInfo.Column("dispatch_note_id", "TEXT", true, 1, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsDeliveries.put("dispatch_number", new TableInfo.Column("dispatch_number", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsDeliveries.put("driver_id", new TableInfo.Column("driver_id", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsDeliveries.put("customer_name", new TableInfo.Column("customer_name", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsDeliveries.put("customer_address", new TableInfo.Column("customer_address", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsDeliveries.put("customer_phone", new TableInfo.Column("customer_phone", "TEXT", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsDeliveries.put("items_count", new TableInfo.Column("items_count", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsDeliveries.put("items", new TableInfo.Column("items", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsDeliveries.put("status", new TableInfo.Column("status", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsDeliveries.put("latitude", new TableInfo.Column("latitude", "REAL", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsDeliveries.put("longitude", new TableInfo.Column("longitude", "REAL", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsDeliveries.put("delivery_latitude", new TableInfo.Column("delivery_latitude", "REAL", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsDeliveries.put("delivery_longitude", new TableInfo.Column("delivery_longitude", "REAL", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsDeliveries.put("dispatch_date", new TableInfo.Column("dispatch_date", "TEXT", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsDeliveries.put("delivered_at", new TableInfo.Column("delivered_at", "INTEGER", false, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsDeliveries.put("pendingSync", new TableInfo.Column("pendingSync", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsDeliveries.put("last_updated", new TableInfo.Column("last_updated", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        _columnsDeliveries.put("isDeleted", new TableInfo.Column("isDeleted", "INTEGER", true, 0, null, TableInfo.CREATED_FROM_ENTITY));
        final HashSet<TableInfo.ForeignKey> _foreignKeysDeliveries = new HashSet<TableInfo.ForeignKey>(0);
        final HashSet<TableInfo.Index> _indicesDeliveries = new HashSet<TableInfo.Index>(3);
        _indicesDeliveries.add(new TableInfo.Index("index_deliveries_status", false, Arrays.asList("status"), Arrays.asList("ASC")));
        _indicesDeliveries.add(new TableInfo.Index("index_deliveries_driver_id", false, Arrays.asList("driver_id"), Arrays.asList("ASC")));
        _indicesDeliveries.add(new TableInfo.Index("index_deliveries_pendingSync", false, Arrays.asList("pendingSync"), Arrays.asList("ASC")));
        final TableInfo _infoDeliveries = new TableInfo("deliveries", _columnsDeliveries, _foreignKeysDeliveries, _indicesDeliveries);
        final TableInfo _existingDeliveries = TableInfo.read(db, "deliveries");
        if (!_infoDeliveries.equals(_existingDeliveries)) {
          return new RoomOpenHelper.ValidationResult(false, "deliveries(com.taf.mobilepos.data.db.entities.Delivery).\n"
                  + " Expected:\n" + _infoDeliveries + "\n"
                  + " Found:\n" + _existingDeliveries);
        }
        return new RoomOpenHelper.ValidationResult(true, null);
      }
    }, "557d7eff3c714dd40b4d5a6ab69fadf3", "5b05ca3de7e031eb906c7bdb720eb3ec");
    final SupportSQLiteOpenHelper.Configuration _sqliteConfig = SupportSQLiteOpenHelper.Configuration.builder(config.context).name(config.name).callback(_openCallback).build();
    final SupportSQLiteOpenHelper _helper = config.sqliteOpenHelperFactory.create(_sqliteConfig);
    return _helper;
  }

  @Override
  @NonNull
  protected InvalidationTracker createInvalidationTracker() {
    final HashMap<String, String> _shadowTablesMap = new HashMap<String, String>(0);
    final HashMap<String, Set<String>> _viewTables = new HashMap<String, Set<String>>(0);
    return new InvalidationTracker(this, _shadowTablesMap, _viewTables, "products","product_categories","cart_items","sales_receipts","customers","deliveries");
  }

  @Override
  public void clearAllTables() {
    super.assertNotMainThread();
    final SupportSQLiteDatabase _db = super.getOpenHelper().getWritableDatabase();
    final boolean _supportsDeferForeignKeys = android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP;
    try {
      if (!_supportsDeferForeignKeys) {
        _db.execSQL("PRAGMA foreign_keys = FALSE");
      }
      super.beginTransaction();
      if (_supportsDeferForeignKeys) {
        _db.execSQL("PRAGMA defer_foreign_keys = TRUE");
      }
      _db.execSQL("DELETE FROM `products`");
      _db.execSQL("DELETE FROM `product_categories`");
      _db.execSQL("DELETE FROM `cart_items`");
      _db.execSQL("DELETE FROM `sales_receipts`");
      _db.execSQL("DELETE FROM `customers`");
      _db.execSQL("DELETE FROM `deliveries`");
      super.setTransactionSuccessful();
    } finally {
      super.endTransaction();
      if (!_supportsDeferForeignKeys) {
        _db.execSQL("PRAGMA foreign_keys = TRUE");
      }
      _db.query("PRAGMA wal_checkpoint(FULL)").close();
      if (!_db.inTransaction()) {
        _db.execSQL("VACUUM");
      }
    }
  }

  @Override
  @NonNull
  protected Map<Class<?>, List<Class<?>>> getRequiredTypeConverters() {
    final HashMap<Class<?>, List<Class<?>>> _typeConvertersMap = new HashMap<Class<?>, List<Class<?>>>();
    _typeConvertersMap.put(ProductDao.class, ProductDao_Impl.getRequiredConverters());
    _typeConvertersMap.put(ProductCategoryDao.class, ProductCategoryDao_Impl.getRequiredConverters());
    _typeConvertersMap.put(CartDao.class, CartDao_Impl.getRequiredConverters());
    _typeConvertersMap.put(SalesReceiptDao.class, SalesReceiptDao_Impl.getRequiredConverters());
    _typeConvertersMap.put(CustomerDao.class, CustomerDao_Impl.getRequiredConverters());
    _typeConvertersMap.put(DeliveryDao.class, DeliveryDao_Impl.getRequiredConverters());
    return _typeConvertersMap;
  }

  @Override
  @NonNull
  public Set<Class<? extends AutoMigrationSpec>> getRequiredAutoMigrationSpecs() {
    final HashSet<Class<? extends AutoMigrationSpec>> _autoMigrationSpecsSet = new HashSet<Class<? extends AutoMigrationSpec>>();
    return _autoMigrationSpecsSet;
  }

  @Override
  @NonNull
  public List<Migration> getAutoMigrations(
      @NonNull final Map<Class<? extends AutoMigrationSpec>, AutoMigrationSpec> autoMigrationSpecs) {
    final List<Migration> _autoMigrations = new ArrayList<Migration>();
    return _autoMigrations;
  }

  @Override
  public ProductDao productDao() {
    if (_productDao != null) {
      return _productDao;
    } else {
      synchronized(this) {
        if(_productDao == null) {
          _productDao = new ProductDao_Impl(this);
        }
        return _productDao;
      }
    }
  }

  @Override
  public ProductCategoryDao productCategoryDao() {
    if (_productCategoryDao != null) {
      return _productCategoryDao;
    } else {
      synchronized(this) {
        if(_productCategoryDao == null) {
          _productCategoryDao = new ProductCategoryDao_Impl(this);
        }
        return _productCategoryDao;
      }
    }
  }

  @Override
  public CartDao cartDao() {
    if (_cartDao != null) {
      return _cartDao;
    } else {
      synchronized(this) {
        if(_cartDao == null) {
          _cartDao = new CartDao_Impl(this);
        }
        return _cartDao;
      }
    }
  }

  @Override
  public SalesReceiptDao salesReceiptDao() {
    if (_salesReceiptDao != null) {
      return _salesReceiptDao;
    } else {
      synchronized(this) {
        if(_salesReceiptDao == null) {
          _salesReceiptDao = new SalesReceiptDao_Impl(this);
        }
        return _salesReceiptDao;
      }
    }
  }

  @Override
  public CustomerDao customerDao() {
    if (_customerDao != null) {
      return _customerDao;
    } else {
      synchronized(this) {
        if(_customerDao == null) {
          _customerDao = new CustomerDao_Impl(this);
        }
        return _customerDao;
      }
    }
  }

  @Override
  public DeliveryDao deliveryDao() {
    if (_deliveryDao != null) {
      return _deliveryDao;
    } else {
      synchronized(this) {
        if(_deliveryDao == null) {
          _deliveryDao = new DeliveryDao_Impl(this);
        }
        return _deliveryDao;
      }
    }
  }
}
