Initial commit: EatMe attendance tracker
Google-SSO PWA for bistro employee clock-in/out, admin employee management, and stats with CSV export. Express + SQLite backend, React + Zustand frontend in the light-mono-tui design language. Multi-stage Dockerfile, compose.yaml for image-based deploys, nginx reverse-proxy template, and an OKF documentation bundle in docs/. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
33
backend/src/types.ts
Normal file
33
backend/src/types.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
export type EventType = "clock_in" | "clock_out" | "break_start" | "break_end";
|
||||
|
||||
export interface Employee {
|
||||
id: number;
|
||||
email: string;
|
||||
name: string | null;
|
||||
active: 0 | 1;
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface AttendanceEvent {
|
||||
id: number;
|
||||
employee_id: number;
|
||||
type: EventType;
|
||||
ts: string;
|
||||
}
|
||||
|
||||
export type Role = "admin" | "employee";
|
||||
|
||||
export interface SessionUser {
|
||||
email: string;
|
||||
name: string | null;
|
||||
role: Role;
|
||||
employeeId: number | null;
|
||||
}
|
||||
|
||||
declare global {
|
||||
namespace Express {
|
||||
interface Request {
|
||||
user?: SessionUser;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user