EFTable<T extends IModel> constructor
EFTable<T extends IModel> ({
- required String tableName,
- List<
PropertyEnum> ? enumProperties, - List<
EFProperty< ? properties,T> > - required PrimaryKeyGetDelegate<
T> primaryKeyGet, - required PrimaryKeySetDelegate<
T> primaryKeySet, - required NewEmptyObjectDelegate<
T> newEmptyObject, - PrimaryKeyEnum primrayKeyType = PrimaryKeyEnum.Default,
- FromMapFunc<
T> ? fromMap, - ToMapFunc<
T> ? toMap, - bool isAutoMap = true,
- bool isUseEnum = false,
- String primaryKeyName = "id",
- List<
T> ? defaultValues,
Implementation
EFTable(
{required this.tableName,
this.enumProperties,
this.properties,
required this.primaryKeyGet,
required this.primaryKeySet,
required this.newEmptyObject,
this.primrayKeyType = PrimaryKeyEnum.Default,
this.fromMap,
this.toMap,
this.isAutoMap = true,
this.isUseEnum = false,
this.primaryKeyName = "id",
this.defaultValues}) {
if (isUseEnum) {
isAutoMap = false;
properties = enumProperties!
.map((e) => EFProperty<T>(name: e.name, type: e.type))
.toList();
}
}