feat: Initialize frontend and backend structure with essential configurations and entities

This commit is contained in:
2025-03-09 10:55:00 +00:00
parent 609bc904ea
commit 2f469c1830
25 changed files with 5863 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
package main
import (
"fmt"
"net/http"
)
func helloHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintln(w, "Hello from the Time Tracker Backend!")
}
func main() {
http.HandleFunc("/", helloHandler)
fmt.Println("Server listening on port 8080")
http.ListenAndServe(":8080", nil)
}
+3
View File
@@ -0,0 +1,3 @@
module github.com/timetracker/backend
go 1.23.6
@@ -0,0 +1,7 @@
package entities
type Activity struct {
ID int
Name string
BillingRate float64
}
@@ -0,0 +1,6 @@
package entities
type Company struct {
ID int
Name string
}
@@ -0,0 +1,7 @@
package entities
type Customer struct {
ID int
Name string
CompanyID int
}
@@ -0,0 +1,7 @@
package entities
type Project struct {
ID int
Name string
CustomerID int
}
@@ -0,0 +1,14 @@
package entities
import "time"
type TimeEntry struct {
ID int
UserID int
ProjectID int
ActivityID int
Start time.Time
End time.Time
Description string
Billable int // Percentage (0-100)
}
+10
View File
@@ -0,0 +1,10 @@
package entities
type User struct {
ID int
Username string
Password string
Role string
CompanyID int
HourlyRate float64
}