feat: Introduce base entity structure and update DTOs for Activity, Company, User, and TimeEntry

This commit is contained in:
2025-03-09 20:28:46 +00:00
parent 9749d5658c
commit 837cd55a33
18 changed files with 255 additions and 54 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ import (
)
type Activity struct {
ID ulid.ULID
EntityBase
Name string
BillingRate float64
}
+14
View File
@@ -0,0 +1,14 @@
package entities
import (
"time"
"github.com/oklog/ulid/v2"
)
type EntityBase struct {
ID ulid.ULID
CreatedAt time.Time
UpdatedAt time.Time
LastEditorID ulid.ULID
}
+1 -1
View File
@@ -3,7 +3,7 @@ package entities
import "github.com/oklog/ulid/v2"
type Company struct {
ID ulid.ULID
EntityBase
Name string
}
@@ -7,7 +7,7 @@ import (
)
type TimeEntry struct {
ID ulid.ULID
EntityBase
UserID int
ProjectID int
ActivityID int
+1 -1
View File
@@ -3,7 +3,7 @@ package entities
import "github.com/oklog/ulid/v2"
type User struct {
ID ulid.ULID
EntityBase
Username string
Password string
Role string