You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

48 lines
1.3 KiB

package models
type Project struct {
ID int64 `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
URL string `json:"url"`
Image string `json:"image"`
Tags []string `json:"tags"`
SortOrder int `json:"sort_order"`
Featured bool `json:"featured"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
type CreateProjectRequest struct {
Title string `json:"title"`
Description string `json:"description"`
URL string `json:"url"`
Image string `json:"image"`
Tags []string `json:"tags"`
SortOrder int `json:"sort_order"`
Featured bool `json:"featured"`
}
type UpdateProjectRequest struct {
Title *string `json:"title,omitempty"`
Description *string `json:"description,omitempty"`
URL *string `json:"url,omitempty"`
Image *string `json:"image,omitempty"`
Tags []string `json:"tags,omitempty"`
SortOrder *int `json:"sort_order,omitempty"`
Featured *bool `json:"featured,omitempty"`
}
type LoginRequest struct {
Username string `json:"username"`
Password string `json:"password"`
}
type LoginResponse struct {
Token string `json:"token"`
ExpiresAt string `json:"expires_at"`
}
type APIError struct {
Error string `json:"error"`
}