init method

Implementation

SqfEntitySequenceBase init() {
  cycle = cycle ?? false;
  if (minValue >= maxValue) {
    throw Exception('SQFENTITIY: SEQUENCE ($sequenceName) INITIALIZE ERROR! The maxValue must be greater than minValue');
  } else if (!(minValue <= startWith && startWith < maxValue)) {
    throw Exception('SQFENTITIY: SEQUENCE ($sequenceName) INITIALIZE ERROR! The startWith value must between minValue and maxValue');
  }

  modelName = modelName ?? '${sequenceName!.substring(0, 1).toUpperCase() + sequenceName!.substring(1).toLowerCase()}Sequence';

  //print('>>>>>>>>>>>>>>>>>>>>>>>>>>>> SqfEntitySequenceBase of [$sequenceName] initialized successfully');
  return this;
}