ch some
This commit is contained in:
19
README.md
19
README.md
@@ -56,14 +56,21 @@ Additional Swagger endpoints (categories, settings) are documented but not yet i
|
||||
├── config.yaml # Runtime configuration
|
||||
├── docker-compose.yaml # Local development stack
|
||||
├── db/migrations/ # SQL migrations
|
||||
├── db/seed.sql # Consolidated, idempotent seed data
|
||||
├── docs/ # Generated Swagger docs
|
||||
├── internal/
|
||||
│ ├── admin/auth/ # Admin auth handlers & repository
|
||||
│ ├── appresult/ # Response helpers & JWT middleware
|
||||
│ ├── config/ # Config loader
|
||||
│ └── handlers/manager/ # Route registration
|
||||
│ ├── shared/ # Cross-module DTOs, HTTP/SQL/query helpers
|
||||
│ ├── handlers/manager/ # Route registration (composition root)
|
||||
│ ├── identity/ # auth, rbac, permission, role, user, userbranch, activitylog
|
||||
│ ├── cards/ # card orders, balances, PIN orders, rekwizit, etc.
|
||||
│ ├── lending/ # loan orders, repayments, documents, letters, types
|
||||
│ ├── org/ # branches, provinces
|
||||
│ ├── currency/, dashboard/, backup/
|
||||
└── pkg/
|
||||
├── client/postgresql/ # PostgreSQL connection pool
|
||||
├── repository/genericrepo/ # Shared List/GetByID/Delete repository helper
|
||||
├── logging/ # Structured logging
|
||||
└── utils/ # JWT & file utilities
|
||||
```
|
||||
@@ -165,6 +172,14 @@ make migrate-rollback
|
||||
|
||||
Migration files live in `db/migrations/`.
|
||||
|
||||
> **Current practice:** the schema currently lives in a single `db/migrations/20260702125108_init.{up,down}.sql` pair, edited in place as the schema evolves rather than appended to. This means an already-migrated database won't pick up later edits to `init` automatically (`golang-migrate` sees it as already applied) — a fresh `make migrate` against an empty database is the reliable path. Switching to append-only migrations going forward is worth deciding on as a team.
|
||||
|
||||
Seed data (`db/seed.sql`) loads a consolidated, idempotent set of test accounts/roles/branches:
|
||||
|
||||
```bash
|
||||
make seed
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
### Run tests
|
||||
|
||||
Reference in New Issue
Block a user