BusinessId.create constructor

BusinessId.create({
  1. required Guid value,
})

Implementation

factory BusinessId.create({required Guid value}) {
  if (value.toString().trim().isEmpty) {
    throw InvalidValueObjectStateException(
      error: ErrorType("business id is required"),
    );
  }

  return BusinessId._(value: value);
}