create method
FutureOr<void>
create(
- ProjectStaffModel entity, {
- bool createOpLog = false,
- DataOperation dataOperation = DataOperation.create,
override
The create
method creates a new entity.
Implementation
@override
FutureOr<void> create(
ProjectStaffModel entity, {
bool createOpLog = false,
DataOperation dataOperation = DataOperation.create,
}) async {
return retryLocalCallOperation(() async {
final companion = entity.companion;
await sql.batch((batch) {
batch.insert(
sql.projectStaff,
companion,
mode: InsertMode.insertOrReplace,
);
});
await super.create(
entity,
createOpLog: createOpLog,
);
});
}