mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-10 20:30:26 +00:00
Some checks are pending
Build and Push Docker Images / create_manifest (web, surfsense-web) (push) Blocked by required conditions
Build and Push Docker Images / tag_release (push) Waiting to run
Build and Push Docker Images / build (./surfsense_backend, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-24.04-arm, linux/arm64, arm64) (push) Blocked by required conditions
Build and Push Docker Images / build (./surfsense_backend, ./surfsense_backend/Dockerfile, backend, surfsense-backend, ubuntu-latest, linux/amd64, amd64) (push) Blocked by required conditions
Build and Push Docker Images / build (./surfsense_web, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-24.04-arm, linux/arm64, arm64) (push) Blocked by required conditions
Build and Push Docker Images / build (./surfsense_web, ./surfsense_web/Dockerfile, web, surfsense-web, ubuntu-latest, linux/amd64, amd64) (push) Blocked by required conditions
Build and Push Docker Images / create_manifest (backend, surfsense-backend) (push) Blocked by required conditions
20 lines
788 B
TypeScript
20 lines
788 B
TypeScript
import { number, string, table } from "@rocicorp/zero";
|
|
|
|
/**
|
|
* Live-meter slice of the ``user`` table replicated through Zero.
|
|
*
|
|
* ``premiumCreditMicrosLimit`` / ``premiumCreditMicrosUsed`` are stored
|
|
* as integer micro-USD (1_000_000 == $1.00). UI consumers divide by 1M
|
|
* when displaying. Sensitive fields (email, hashed_password, oauth, etc.)
|
|
* are intentionally omitted via the Postgres column-list publication so
|
|
* they never enter WAL replication.
|
|
*/
|
|
export const userTable = table("user")
|
|
.columns({
|
|
id: string(),
|
|
pagesLimit: number().from("pages_limit"),
|
|
pagesUsed: number().from("pages_used"),
|
|
premiumCreditMicrosLimit: number().from("premium_credit_micros_limit"),
|
|
premiumCreditMicrosUsed: number().from("premium_credit_micros_used"),
|
|
})
|
|
.primaryKey("id");
|