Files
be-service-qris/internal/models/employee/employee.go

47 lines
1.5 KiB
Go

package employee
// EmployeeGetResponse represents the response for GET employees
type EmployeeGetResponse struct {
Message string `json:"message"`
Data interface{} `json:"data"`
}
// EmployeeGetByIDResponse represents the response for GET employee by ID
type EmployeeGetByIDResponse struct {
ID string `json:"id"`
Message string `json:"message"`
}
%!(EXTRA string=employee, string=Employee)// EmployeeCreateRequest represents the request for creating employee
type EmployeeCreateRequest struct {
Name string `json:"name" binding:"required"`
// Add more fields as needed
}
// employeeCreateResponse represents the response for creating Employee
type employeeCreateResponse struct {
ID string `json:"id"`
Message string `json:"message"`
Data interface{} `json:"data"`
}
%!(EXTRA string=Employee)// EmployeeUpdateRequest represents the request for updating employee
type EmployeeUpdateRequest struct {
Name string `json:"name" binding:"required"`
// Add more fields as needed
}
// employeeUpdateResponse represents the response for updating Employee
type employeeUpdateResponse struct {
ID string `json:"id"`
Message string `json:"message"`
Data interface{} `json:"data"`
}
%!(EXTRA string=Employee)// EmployeeDeleteResponse represents the response for deleting employee
type EmployeeDeleteResponse struct {
ID string `json:"id"`
Message string `json:"message"`
}
%!(EXTRA string=employee)// ErrorResponse represents an error response
type ErrorResponse struct {
Error string `json:"error"`
}