Update
This commit is contained in:
@@ -132,6 +132,10 @@ type ListInstitutionsResponse struct {
|
||||
Institutions []InstitutionResponse `json:"institutions"`
|
||||
}
|
||||
|
||||
type ListInstitutionsRequest struct {
|
||||
Search *string `json:"search,omitempty" form:"search"`
|
||||
}
|
||||
|
||||
type DispositionActionResponse struct {
|
||||
ID string `json:"id"`
|
||||
Code string `json:"code"`
|
||||
|
||||
@@ -6,6 +6,12 @@ import (
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
type DepartmentInfo struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Code string `json:"code,omitempty"`
|
||||
}
|
||||
|
||||
type DispositionRouteResponse struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
FromDepartmentID uuid.UUID `json:"from_department_id"`
|
||||
@@ -14,6 +20,10 @@ type DispositionRouteResponse struct {
|
||||
AllowedActions map[string]interface{} `json:"allowed_actions,omitempty"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
|
||||
// Department information
|
||||
FromDepartment DepartmentInfo `json:"from_department"`
|
||||
ToDepartment DepartmentInfo `json:"to_department"`
|
||||
}
|
||||
|
||||
type CreateDispositionRouteRequest struct {
|
||||
|
||||
@@ -32,20 +32,20 @@ type IncomingLetterAttachmentResponse struct {
|
||||
}
|
||||
|
||||
type IncomingLetterResponse struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
LetterNumber string `json:"letter_number"`
|
||||
ReferenceNumber *string `json:"reference_number,omitempty"`
|
||||
Subject string `json:"subject"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
PriorityID *uuid.UUID `json:"priority_id,omitempty"`
|
||||
SenderInstitutionID *uuid.UUID `json:"sender_institution_id,omitempty"`
|
||||
ReceivedDate time.Time `json:"received_date"`
|
||||
DueDate *time.Time `json:"due_date,omitempty"`
|
||||
Status string `json:"status"`
|
||||
CreatedBy uuid.UUID `json:"created_by"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
Attachments []IncomingLetterAttachmentResponse `json:"attachments"`
|
||||
ID uuid.UUID `json:"id"`
|
||||
LetterNumber string `json:"letter_number"`
|
||||
ReferenceNumber *string `json:"reference_number,omitempty"`
|
||||
Subject string `json:"subject"`
|
||||
Description *string `json:"description,omitempty"`
|
||||
Priority *PriorityResponse `json:"priority,omitempty"`
|
||||
SenderInstitution *InstitutionResponse `json:"sender_institution,omitempty"`
|
||||
ReceivedDate time.Time `json:"received_date"`
|
||||
DueDate *time.Time `json:"due_date,omitempty"`
|
||||
Status string `json:"status"`
|
||||
CreatedBy uuid.UUID `json:"created_by"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
Attachments []IncomingLetterAttachmentResponse `json:"attachments"`
|
||||
}
|
||||
|
||||
type UpdateIncomingLetterRequest struct {
|
||||
@@ -77,6 +77,7 @@ type CreateDispositionActionSelection struct {
|
||||
}
|
||||
|
||||
type CreateLetterDispositionRequest struct {
|
||||
FromDepartment uuid.UUID `json:"from_department"`
|
||||
LetterID uuid.UUID `json:"letter_id"`
|
||||
ToDepartmentIDs []uuid.UUID `json:"to_department_ids"`
|
||||
Notes *string `json:"notes,omitempty"`
|
||||
@@ -84,20 +85,64 @@ type CreateLetterDispositionRequest struct {
|
||||
}
|
||||
|
||||
type DispositionResponse struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
LetterID uuid.UUID `json:"letter_id"`
|
||||
FromDepartmentID *uuid.UUID `json:"from_department_id,omitempty"`
|
||||
ToDepartmentID *uuid.UUID `json:"to_department_id,omitempty"`
|
||||
Notes *string `json:"notes,omitempty"`
|
||||
Status string `json:"status"`
|
||||
CreatedBy uuid.UUID `json:"created_by"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
ID uuid.UUID `json:"id"`
|
||||
LetterID uuid.UUID `json:"letter_id"`
|
||||
DepartmentID *uuid.UUID `json:"department_id,omitempty"`
|
||||
Notes *string `json:"notes,omitempty"`
|
||||
ReadAt *time.Time `json:"read_at,omitempty"`
|
||||
CreatedBy uuid.UUID `json:"created_by"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
type ListDispositionsResponse struct {
|
||||
Dispositions []DispositionResponse `json:"dispositions"`
|
||||
}
|
||||
|
||||
type EnhancedDispositionResponse struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
LetterID uuid.UUID `json:"letter_id"`
|
||||
DepartmentID *uuid.UUID `json:"department_id,omitempty"`
|
||||
Notes *string `json:"notes,omitempty"`
|
||||
ReadAt *time.Time `json:"read_at,omitempty"`
|
||||
CreatedBy uuid.UUID `json:"created_by"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
Department DepartmentResponse `json:"department"`
|
||||
Departments []DispositionDepartmentResponse `json:"departments"`
|
||||
Actions []DispositionActionSelectionResponse `json:"actions"`
|
||||
DispositionNotes []DispositionNoteResponse `json:"disposition_notes"`
|
||||
}
|
||||
|
||||
type DispositionDepartmentResponse struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
DepartmentID uuid.UUID `json:"department_id"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
Department *DepartmentResponse `json:"department,omitempty"`
|
||||
}
|
||||
|
||||
type DispositionActionSelectionResponse struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
ActionID uuid.UUID `json:"action_id"`
|
||||
Action *DispositionActionResponse `json:"action,omitempty"`
|
||||
Note *string `json:"note,omitempty"`
|
||||
CreatedBy uuid.UUID `json:"created_by"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
type DispositionNoteResponse struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
UserID *uuid.UUID `json:"user_id,omitempty"`
|
||||
Note string `json:"note"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
User *UserResponse `json:"user,omitempty"`
|
||||
}
|
||||
|
||||
type ListEnhancedDispositionsResponse struct {
|
||||
Dispositions []EnhancedDispositionResponse `json:"dispositions"`
|
||||
Discussions []LetterDiscussionResponse `json:"discussions"`
|
||||
}
|
||||
|
||||
type CreateLetterDiscussionRequest struct {
|
||||
ParentID *uuid.UUID `json:"parent_id,omitempty"`
|
||||
Message string `json:"message"`
|
||||
@@ -119,4 +164,10 @@ type LetterDiscussionResponse struct {
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
EditedAt *time.Time `json:"edited_at,omitempty"`
|
||||
|
||||
// Preloaded user profile who created the discussion
|
||||
User *UserResponse `json:"user,omitempty"`
|
||||
|
||||
// Preloaded user profiles for mentions
|
||||
MentionedUsers []UserResponse `json:"mentioned_users,omitempty"`
|
||||
}
|
||||
|
||||
@@ -48,14 +48,15 @@ type LoginResponse struct {
|
||||
}
|
||||
|
||||
type UserResponse struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
IsActive bool `json:"is_active"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
Roles []RoleResponse `json:"roles,omitempty"`
|
||||
Profile *UserProfileResponse `json:"profile,omitempty"`
|
||||
ID uuid.UUID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
Email string `json:"email"`
|
||||
IsActive bool `json:"is_active"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
Roles []RoleResponse `json:"roles,omitempty"`
|
||||
DepartmentResponse []DepartmentResponse `json:"department_response"`
|
||||
Profile *UserProfileResponse `json:"profile,omitempty"`
|
||||
}
|
||||
|
||||
type ListUsersRequest struct {
|
||||
@@ -128,3 +129,15 @@ type TitleResponse struct {
|
||||
type ListTitlesResponse struct {
|
||||
Titles []TitleResponse `json:"titles"`
|
||||
}
|
||||
|
||||
// MentionUsersRequest represents the request for getting users for mention purposes
|
||||
type MentionUsersRequest struct {
|
||||
Search *string `json:"search,omitempty" form:"search"` // Optional search term for username
|
||||
Limit *int `json:"limit,omitempty" form:"limit"` // Optional limit, defaults to 50, max 100
|
||||
}
|
||||
|
||||
// MentionUsersResponse represents the response for getting users for mention purposes
|
||||
type MentionUsersResponse struct {
|
||||
Users []UserResponse `json:"users"`
|
||||
Count int `json:"count"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user