From 8be5f93f5b2d4b6f438ca84094937a0f7101c59b Mon Sep 17 00:00:00 2001
From: T <t@tjp.lol>
Date: Sat, 2 Aug 2025 17:25:59 -0600
Subject: Initial commit of punchcard.

Contains working time tracking commands, and the stub of a command to
generate reports.
---
 internal/database/schema.sql | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 internal/database/schema.sql

(limited to 'internal/database/schema.sql')

diff --git a/internal/database/schema.sql b/internal/database/schema.sql
new file mode 100644
index 0000000..a4483e1
--- /dev/null
+++ b/internal/database/schema.sql
@@ -0,0 +1,28 @@
+create table if not exists client (
+    id integer primary key autoincrement,
+    name text not null unique,
+    email text,
+    billable_rate integer,
+    created_at datetime default current_timestamp
+);
+
+create table if not exists project (
+    id integer primary key autoincrement,
+    name text not null unique,
+    client_id integer not null,
+    billable_rate integer,
+    created_at datetime default current_timestamp,
+    foreign key (client_id) references client(id)
+);
+
+create table if not exists time_entry (
+    id integer primary key autoincrement,
+    start_time datetime not null,
+    end_time datetime,
+    description text,
+    client_id integer not null,
+    project_id integer,
+    billable_rate integer,
+    foreign key (client_id) references client(id),
+    foreign key (project_id) references project(id)
+);
-- 
cgit v1.2.3

