# Microservice: CORE
## ORM LIST

1. Configurations
2. Apps
3. Users
4. Security

---

## ORM - SUB-ORM list
1. configurations =>

| Sub-orm Name     | Unique ID        | Routing Key                | Description
|------------------|------------------|----------------------------| ----------------------------------
| microservices    | microservice_id  | microservice_name          | Registered microservice names
| servers          | server_id        | server_id                  | Server or node configurations
| endpoints        | endpoint_id      | UPPER(version-method-endpoint)
| token_issuers    | issuer_id        | issuer_name                | JWT token issuers
| token_audiences  | audience_id      | audience_name              | JWT token audiences


2.Tenants =>

| Sub-Orm Name           | Unique ID           | Routing Key       | Description
| -----------------------|---------------------|-------------------|-------------------------------------
| apps                   | app_id              | app_id            | Core app identity
| app_profile            | app_profile_id      | app_id            | Name, logo, bio
| app_details            | app_detail_id       | app_id            | Technical configurations
| app_contacts           | app_contact_id      | app_id            | Support & team contact
| app_storage            | app_storage_id      | app_id            | Files, quota usage
<!-- | app_endpoints          | endpoint_id         | app_id            | App-specific API exposure + permissions -->
| roles                  | role_id             | app_id            | Role definitions + permissions
| app_activity_logs      | log_id              | app_id            | System audit trails
| app_themes             | theme_id            | app_id            | Custom appearance
| app_domains            | domain_id           | app_id            | Custom domains/subdomains
| app_integrations       | integration_id      | app_id            | Third-party connections
| app_tokens             | token_id            | app_id            | API/auth tokens
| app_limits             | limit_id            | app_id            | Rate limits, usage thresholds
| app_plans              | plan_id             | app_id            | App's subscription tier
| app_billing            | billing_id          | app_id            | Billing provider data


3. Users =>

| Sub-orm name          | Unique id         | Routing key  | Description
| ----------------------|-------------------|--------------|----------------------------------------
| users                 | user_id           | user_id      | User orm entry point / root
| user_profile          | user_profile_id   | user_id      | user profile details
| user_contact_detail   | contact_detail_id | user_id      | user all contact info
| user_preferences      | preference_id     | user_id      | Language, timezone, theme, app UI pref
| user_devices          | device_id         | user_id      | all saved devices for an user
| user_audit_logs       | audit_log_id      | user_id      | Action log, activity tracking,access-evnts
| user_sessions         | session_id        | user_id      | all active / saved login jwt
| user_roles            | role_id           | user_id      | roles from app orm but for this user + permit
|      

4. Security =>

| Sub-orm name          | Unique id         | Routing key  | Description
| ----------------------|-------------------|--------------|----------------------------------------
| app_auth              | app_auth_id       | app_id       | manage all app auth jwt create validate
| user_auth             | user_auth_id      | user_id      | manage all user auth jwt create validate
| roles                 | role_id           | app_id


