feat: implement core backend architecture and project management services for the History API
Build and Release / release (push) Successful in 1m33s

This commit is contained in:
2026-06-05 14:18:55 +07:00
parent 420a9ad43a
commit fdcd44cc00
70 changed files with 944 additions and 734 deletions
+24 -24
View File
@@ -6,17 +6,17 @@ import (
)
type EntityEntity struct {
ID string `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
Description string `json:"description"`
ProjectID string `json:"project_id"`
Status *int16 `json:"status"`
TimeStart *int32 `json:"time_start"`
TimeEnd *int32 `json:"time_end"`
IsDeleted bool `json:"is_deleted"`
CreatedAt *time.Time `json:"created_at"`
UpdatedAt *time.Time `json:"updated_at"`
ID string `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
Description string `json:"description"`
ProjectID string `json:"project_id"`
Status *int16 `json:"status"`
TimeStart *int32 `json:"time_start"`
TimeEnd *int32 `json:"time_end"`
IsDeleted bool `json:"is_deleted"`
CreatedAt *time.Time `json:"created_at"`
UpdatedAt *time.Time `json:"updated_at"`
}
func (e *EntityEntity) ToResponse() *response.EntityResponse {
@@ -24,25 +24,25 @@ func (e *EntityEntity) ToResponse() *response.EntityResponse {
return nil
}
return &response.EntityResponse{
ID: e.ID,
Name: e.Name,
Slug: e.Slug,
Description: e.Description,
ProjectID: e.ProjectID,
Status: e.Status,
TimeStart: e.TimeStart,
TimeEnd: e.TimeEnd,
IsDeleted: e.IsDeleted,
CreatedAt: e.CreatedAt,
UpdatedAt: e.UpdatedAt,
ID: e.ID,
Name: e.Name,
Slug: e.Slug,
Description: e.Description,
ProjectID: e.ProjectID,
Status: e.Status,
TimeStart: e.TimeStart,
TimeEnd: e.TimeEnd,
IsDeleted: e.IsDeleted,
CreatedAt: e.CreatedAt,
UpdatedAt: e.UpdatedAt,
}
}
func EntitiesEntityToResponse(es []*EntityEntity) []*response.EntityResponse {
out := make([]*response.EntityResponse, 0)
if es == nil {
return out
return []*response.EntityResponse{}
}
out := make([]*response.EntityResponse, 0, len(es))
for _, e := range es {
if e == nil {
continue