123 lines
5.1 KiB
Go
123 lines
5.1 KiB
Go
package contract
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type CreateIncomingLetterAttachment struct {
|
|
FileURL string `json:"file_url"`
|
|
FileName string `json:"file_name"`
|
|
FileType string `json:"file_type"`
|
|
}
|
|
|
|
type CreateIncomingLetterRequest struct {
|
|
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"`
|
|
Attachments []CreateIncomingLetterAttachment `json:"attachments,omitempty"`
|
|
}
|
|
|
|
type IncomingLetterAttachmentResponse struct {
|
|
ID uuid.UUID `json:"id"`
|
|
FileURL string `json:"file_url"`
|
|
FileName string `json:"file_name"`
|
|
FileType string `json:"file_type"`
|
|
UploadedAt time.Time `json:"uploaded_at"`
|
|
}
|
|
|
|
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"`
|
|
}
|
|
|
|
type UpdateIncomingLetterRequest struct {
|
|
ReferenceNumber *string `json:"reference_number,omitempty"`
|
|
Subject *string `json:"subject,omitempty"`
|
|
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,omitempty"`
|
|
DueDate *time.Time `json:"due_date,omitempty"`
|
|
Status *string `json:"status,omitempty"`
|
|
}
|
|
|
|
type ListIncomingLettersRequest struct {
|
|
Page int `json:"page"`
|
|
Limit int `json:"limit"`
|
|
Status *string `json:"status,omitempty"`
|
|
Query *string `json:"query,omitempty"`
|
|
}
|
|
|
|
type ListIncomingLettersResponse struct {
|
|
Letters []IncomingLetterResponse `json:"letters"`
|
|
Pagination PaginationResponse `json:"pagination"`
|
|
}
|
|
|
|
type CreateDispositionActionSelection struct {
|
|
ActionID uuid.UUID `json:"action_id"`
|
|
Note *string `json:"note,omitempty"`
|
|
}
|
|
|
|
type CreateLetterDispositionRequest struct {
|
|
LetterID uuid.UUID `json:"letter_id"`
|
|
ToDepartmentIDs []uuid.UUID `json:"to_department_ids"`
|
|
Notes *string `json:"notes,omitempty"`
|
|
SelectedActions []CreateDispositionActionSelection `json:"selected_actions,omitempty"`
|
|
}
|
|
|
|
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"`
|
|
}
|
|
|
|
type ListDispositionsResponse struct {
|
|
Dispositions []DispositionResponse `json:"dispositions"`
|
|
}
|
|
|
|
type CreateLetterDiscussionRequest struct {
|
|
ParentID *uuid.UUID `json:"parent_id,omitempty"`
|
|
Message string `json:"message"`
|
|
Mentions map[string]interface{} `json:"mentions,omitempty"`
|
|
}
|
|
|
|
type UpdateLetterDiscussionRequest struct {
|
|
Message string `json:"message"`
|
|
Mentions map[string]interface{} `json:"mentions,omitempty"`
|
|
}
|
|
|
|
type LetterDiscussionResponse struct {
|
|
ID uuid.UUID `json:"id"`
|
|
LetterID uuid.UUID `json:"letter_id"`
|
|
ParentID *uuid.UUID `json:"parent_id,omitempty"`
|
|
UserID uuid.UUID `json:"user_id"`
|
|
Message string `json:"message"`
|
|
Mentions map[string]interface{} `json:"mentions,omitempty"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
EditedAt *time.Time `json:"edited_at,omitempty"`
|
|
}
|