SqfEntityModel constructor

const SqfEntityModel({
  1. String? databaseName,
  2. List<SqfEntityTable>? databaseTables,
  3. String? bundledDatabasePath,
  4. String? modelName,
  5. List<SqfEntitySequence>? sequences,
  6. List<SqfEntityTable>? formTables,
  7. String? password,
  8. List<String>? ignoreForFile,
  9. int? dbVersion,
  10. List<SqfEntityField>? defaultColumns,
  11. PreSaveAction? preSaveAction,
  12. LogFunction? logFunction,
  13. String? databasePath,
})

This class is required for DB MODEL definitions using in /lib/model/model.dart file Simple DB Model definition must be below:

@SqfEntityBuilder(myDbModel)
const myDbModel = SqfEntityModel(
modelName: 'MyDbModel',
databaseName: 'sample.db',
databaseTables: [tableProduct, tableCategory, tableTodo],
defaultColumns: [
  SqfEntityField('dateCreated', DbType.datetime,
      defaultValue: 'DateTime.now()'),
]);

Implementation

const SqfEntityModel({this.databaseName, this.databaseTables, this.bundledDatabasePath, this.modelName, this.sequences, this.formTables, this.password, this.ignoreForFile, this.dbVersion, this.defaultColumns, this.preSaveAction, this.logFunction, this.databasePath});