config
Classess with @configuration annotation
All related to configuration both startup and during runtime
constant
All error codes and messeges will be part of dk-lib-base eventualy.
All transaction status codes will be part dk-lib-base eventualy.
It should be central because it is easier to maintain the consistensy of grammar for the entire application. It gives you a better perspective.
Message Codes (Error Codes) are important for traceability purposes. Upstream services should not override the error code retrieve from the downstream. This
entity
Should be 1 is to 1 with tables in the database.
Only in rare case that you should have the not 1 to 1 case.
dto
All response and request javabeans that goes through the network.
Each beans has standard payload format. Like with transaction status codes and message. A model don't have transation messeges.
externalresponse
Used in Gateways, these are the bean classes that contains the requested payload from external services.
Suffix = ExtReponse
externalrequest
Used as the request parameter recieved by an endpoint.
Could be save to DB or used as criteria to retrieve data from DB.
Suffix = ExtRequest
request
Request bean classes used to get external payload.
Suffix = Request
response
Response bean. The payload given to the requesting external service
model
For within the service use only.
Maximize entity beans. The use of model should be minimal if the data Architecture is properly designed.
mapper
enrichment
Contains codes that validates and completes Models. e.g. requires Async to complete the transation. like wait for paypal.
rule
uses rulebook spring linbrary
both fields and business