Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmployeeCreateInput ¶
type EmployeeCreateInput struct { CompanyID int `json:"-"` FullName string `max:"32" json:"full_name"` Email string `max:"48" json:"email"` PhoneNumber string `max:"16" json:"phone_number"` RoleID int `json:"role_id"` }
EmployeeCreateInput is used as request for create new employee
type EmployeeListInput ¶
type EmployeeListInput struct { CompanyID int `json:"-"` Page int `min:"1" json:"-"` Limit int `min:"10" json:"-"` }
EmployeeListInput is used as request for employee list
type EmployeeListOutput ¶
type EmployeeListOutput struct { Count int `json:"count"` Employees []EmployeeOutput `json:"employees"` }
EmployeeListOutput is used as response for employee list
type EmployeeOutput ¶
type EmployeeOutput struct { ID int `json:"id"` FullName string `json:"full_name"` Email string `json:"email"` PhoneNumber string `json:"phone_number"` RoleID int `json:"role_id"` RoleName string `json:"role_name"` Status string `json:"status"` RowUpdated int `json:"row_updated"` }
EmployeeOutput is used as response for employee
type EmployeeUpdateInput ¶
type EmployeeUpdateInput struct { CompanyID int `json:"-"` ID int `json:"id"` FullName string `max:"32" json:"full_name"` RoleID int `json:"role_id"` }
EmployeeUpdateInput is used as request for update existing employee
type ServiceEmployee ¶
type ServiceEmployee struct {
// contains filtered or unexported fields
}
ServiceEmployee contains repositories and Employee use cases
func New ¶
func New( rEmployee repository.RepositoryEmployee, rRole repository.RepositoryRole, ) *ServiceEmployee
New returns the ServiceEmployee service
func (*ServiceEmployee) CreateEmployee ¶
func (s *ServiceEmployee) CreateEmployee(eci EmployeeCreateInput) (*EmployeeOutput, int, error)
CreateEmployee is used to create employee data
func (*ServiceEmployee) GetEmployeeList ¶
func (s *ServiceEmployee) GetEmployeeList(eli EmployeeListInput) (*EmployeeListOutput, int, error)
GetEmployeeList is used to get employee list
func (*ServiceEmployee) UpdateEmployee ¶
func (s *ServiceEmployee) UpdateEmployee(eui EmployeeUpdateInput) (*EmployeeOutput, int, error)
UpdateEmployee is used to update employee data
Click to show internal directories.
Click to hide internal directories.