Fix BASE_URL config loading, add tasks/projects; robust .env path resolution
- Config: try ENV_FILE, .env, ../.env for loading; trim trailing slash from BaseURL - Log BASE_URL at server startup for verification - .env.example: document BASE_URL - Tasks, projects, tags, migrations and related API/handlers Made-with: Cursor
This commit is contained in:
@@ -79,6 +79,70 @@ type Attachment struct {
|
||||
FileURL string `json:"file_url"`
|
||||
}
|
||||
|
||||
type Task struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
OwnerID uuid.UUID `json:"owner_id"`
|
||||
Title string `json:"title"`
|
||||
Description *string `json:"description"`
|
||||
Status string `json:"status"`
|
||||
Priority string `json:"priority"`
|
||||
DueDate *time.Time `json:"due_date"`
|
||||
CompletedAt *time.Time `json:"completed_at"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
ProjectID *uuid.UUID `json:"project_id"`
|
||||
ParentID *uuid.UUID `json:"parent_id"`
|
||||
SortOrder int `json:"sort_order"`
|
||||
RecurrenceRule *string `json:"recurrence_rule"`
|
||||
Subtasks []Task `json:"subtasks,omitempty"`
|
||||
Tags []Tag `json:"tags,omitempty"`
|
||||
CompletionPercentage *int `json:"completion_percentage,omitempty"`
|
||||
}
|
||||
|
||||
type Project struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
OwnerID uuid.UUID `json:"owner_id"`
|
||||
Name string `json:"name"`
|
||||
Color string `json:"color"`
|
||||
IsShared bool `json:"is_shared"`
|
||||
Deadline *time.Time `json:"deadline"`
|
||||
SortOrder int `json:"sort_order"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
type ProjectMember struct {
|
||||
UserID uuid.UUID `json:"user_id"`
|
||||
Email string `json:"email"`
|
||||
Role string `json:"role"`
|
||||
}
|
||||
|
||||
type TaskWebhook struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
OwnerID uuid.UUID `json:"owner_id"`
|
||||
URL string `json:"url"`
|
||||
Events []string `json:"events"`
|
||||
Secret *string `json:"secret,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
type TaskReminder struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
TaskID uuid.UUID `json:"task_id"`
|
||||
Type string `json:"type"`
|
||||
Config map[string]interface{} `json:"config"`
|
||||
ScheduledAt time.Time `json:"scheduled_at"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
type Tag struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
OwnerID uuid.UUID `json:"owner_id"`
|
||||
Name string `json:"name"`
|
||||
Color string `json:"color"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
type Contact struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
FirstName *string `json:"first_name"`
|
||||
|
||||
Reference in New Issue
Block a user