implemented data sources with prisma in go
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
package entities
|
||||
|
||||
import "time"
|
||||
|
||||
// Project Domain
|
||||
type Project struct {
|
||||
ID string
|
||||
Name string
|
||||
Description *string
|
||||
ClientID *string
|
||||
UserID string
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
// ProjectCreate
|
||||
type ProjectCreate struct {
|
||||
Name string
|
||||
Description *string
|
||||
ClientID *string
|
||||
UserID string
|
||||
}
|
||||
|
||||
// ProjectUpdate
|
||||
type ProjectUpdate struct {
|
||||
ID string
|
||||
Name *string
|
||||
Description *string
|
||||
ClientID *string
|
||||
UserID *string
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
package entities
|
||||
|
||||
import "time"
|
||||
|
||||
// ProjectTask Domain
|
||||
type ProjectTask struct {
|
||||
ID string
|
||||
Name string
|
||||
Description *string
|
||||
ProjectID string
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
// ProjectTaskCreate
|
||||
type ProjectTaskCreate struct {
|
||||
Name string
|
||||
Description *string
|
||||
ProjectID string
|
||||
}
|
||||
|
||||
// ProjectTaskUpdate
|
||||
type ProjectTaskUpdate struct {
|
||||
ID string
|
||||
Name *string
|
||||
Description *string
|
||||
ProjectID *string
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package entities
|
||||
|
||||
import "time"
|
||||
|
||||
// TimeEntry Domain
|
||||
type TimeEntry struct {
|
||||
ID string
|
||||
StartTime time.Time
|
||||
EndTime *time.Time
|
||||
Description *string
|
||||
UserID string
|
||||
ProjectID string
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
// TimeEntryCreate
|
||||
type TimeEntryCreate struct {
|
||||
StartTime time.Time
|
||||
EndTime *time.Time
|
||||
Description *string
|
||||
UserID string
|
||||
ProjectID string
|
||||
}
|
||||
|
||||
// TimeEntryUpdate
|
||||
type TimeEntryUpdate struct {
|
||||
ID string
|
||||
StartTime *time.Time
|
||||
EndTime *time.Time
|
||||
Description *string
|
||||
UserID *string
|
||||
ProjectID *string
|
||||
}
|
||||
@@ -1,8 +1,30 @@
|
||||
package entities
|
||||
|
||||
import "time"
|
||||
|
||||
// In user.go
|
||||
|
||||
// User Domain
|
||||
type User struct {
|
||||
ID string
|
||||
ID string
|
||||
Name string
|
||||
Email string
|
||||
Password string
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
// UserCreate DTO
|
||||
type UserCreate struct {
|
||||
Name string
|
||||
Email string
|
||||
Password string
|
||||
}
|
||||
|
||||
// UserUpdate DTO
|
||||
type UserUpdate struct {
|
||||
ID string
|
||||
Name *string
|
||||
Email *string
|
||||
Password *string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user