Files
api_tmpl/docs/db.dbml
T
FernandoJVideira c4ee0ce4dc chore: rename simple_bank to api_tmpl and clean up for template use
Rename the module, proto service, and all identifiers from simple_bank/
SimpleBank to api_tmpl/ApiTmpl, and regenerate the gRPC/gateway/swagger/
mock code accordingly.

- Scrub real secrets (SMTP password, auth token secret) from api.env/
  api_test.env, untrack them, and add api.env.example/api_test.env.example
- Remove committed build artifacts (tmp/main, tmp/build-errors.log,
  dbml-error.log) and gitignore them going forward
- Fix Dockerfile paths (build target, migrations copy) that referenced a
  stale project layout
- Rewrite README to match the actual cmd/ + internal/ structure and add a
  "using this as a template" section
2026-08-25 03:02:37 +01:00

39 lines
1.1 KiB
Plaintext

Project api_tmpl {
database_type: 'PostgreSQL'
Note: '''
# API Template Database
'''
}
Table users as U {
username varchar [pk]
role varchar [not null, default: 'member']
hashed_password varchar [not null]
full_name varchar [not null]
email varchar [unique, not null]
is_email_verified bool [not null, default: false]
password_changed_at timestamptz [not null, default: '0001-01-01']
created_at timestamptz [not null, default: `now()`]
}
Table verify_emails {
id bigserial [pk]
username varchar [ref: > U.username, not null]
email varchar [not null]
secret_code varchar [not null]
is_used bool [not null, default: false]
created_at timestamptz [not null, default: `now()`]
expired_at timestamptz [not null, default: `now() + interval '15 minutes'`]
}
Table sessions {
id uuid [pk]
username varchar [ref: > U.username, not null]
refresh_token varchar [not null]
user_agent varchar [not null]
client_ip varchar [not null]
is_blocked boolean [not null, default: false]
expires_at timestamptz [not null]
created_at timestamptz [not null, default: `now()`]
}