VirtoCommerce / vc-module-core

Core module containing common eCommerce domain model and base abstractions
Other
16 stars 21 forks source link

Need to support sequential unique number generation #146

Open tatarincev opened 4 years ago

tatarincev commented 4 years ago

For example RWS800000

I believe they just want them to be sequential starting from

RWS800001 RWS800002 RWS800003 etc…

It seems the current implementation for this template RWS8{1:D5} will produce not unique numbers.

yecli commented 4 years ago

Functional requirements: We want to have a flexible and customizable template creation mechanism that gives us the following functionality:

Technical details: As a possible solution, we could add custom template number generator to the core module, with an ability to change its settings and enable it for the orders, payments, and shipping. Thus custom generator will replace the current one. We need to add an abstraction for this purpose. Implementation could use MSSQL sequence objects under the hood to guarantee a unique and increasing sequence.