diff --git a/web/lib/types.ts b/web/lib/types.ts new file mode 100644 index 0000000..c59a0f3 --- /dev/null +++ b/web/lib/types.ts @@ -0,0 +1,24 @@ +// Mirrors the SQL schema in docker/mysql/init.d/01-schema.sql and the +// JSON projection from app/cm_api.py's get_account / get_user routes. + +export type Acc = { + username: string; + password: string; + status: string; + link: string; +}; + +export type User = { + f_username: string; + f_password: string; + t_username: string; + t_password: string; + last_update_time: string | null; +}; + +export type AccUpdate = Acc; + +export type UserUpdate = Pick< + User, + "f_username" | "f_password" | "t_username" | "t_password" +>;