Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement order log (repository layer) #6

Open
aldy505 opened this issue Jan 1, 2023 · 0 comments
Open

Implement order log (repository layer) #6

aldy505 opened this issue Jan 1, 2023 · 0 comments

Comments

@aldy505
Copy link
Member

aldy505 commented Jan 1, 2023

The database should be SQLite3, and you should use event sourcing.
It would be nice if unit tests are included.

type OrderLogRepository interface {
// Create will insert multiple row into the database.
// Because we are a mock server, nothing should be done through any
// administrator dashboard or some sort that enable real people to
// change the shipping status. Future events can be inserted here.
Create(ctx context.Context, logEntry LogEntry) error
// Get will return only the order history that are before or equal to
// current time. If there are any order history which event happen
// after current time, it will not be shown.
Get(ctx context.Context, referenceNumber string, airWaybill string) ([]OrderHistory, error)
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant