package dev_services

import (
	"time"

	"cpone/db"
)

func NewServicesEmployee(u Employee, uStore db.AppStore) *ServicesEmployee {

	return &ServicesEmployee{
		Employee:      u,
		EmployeeStore: uStore,
	}
}

type Employee struct {
	ID           int       `json:"id"`
	Employeename string    `json:"Employeename"`
	Email        string    `json:"email"`
	CreatedAt    time.Time `json:"created_at,omitempty"`
}

type EmployeeService struct {
	EmployeeID          int    `json:"EmployeeID"`
	EmployeeTitle       string `json:"EmployeeTitle"`
	EmployeeDescription string `json:"EmployeeDescription"`
	EmployeeStartDate   string `json:"EmployeeStartDate"`
	EmployeeEndDate     string `json:"EmployeeEndDate"`
}

type ServicesEmployee struct {
	Employee      Employee
	EmployeeStore db.AppStore
}

func (se *ServicesEmployee) GetEmployeeService() ([]EmployeeService, error) {

	data := []EmployeeService{
		{
			EmployeeID:          1,
			EmployeeTitle:       "MCU Calon Karyawan",
			EmployeeDescription: "Tanggal Pelaksanaan",
			EmployeeStartDate:   "01/04/2024",
			EmployeeEndDate:     "06/04/2024",
		},
		{
			EmployeeID:          2,
			EmployeeTitle:       "MCU Karyawan",
			EmployeeDescription: "Tanggal Pelaksanaan",
			EmployeeStartDate:   "01/04/2024",
			EmployeeEndDate:     "06/04/2024",
		},
		{
			EmployeeID:          1,
			EmployeeTitle:       "MCU Eselon 1",
			EmployeeDescription: "Tanggal Pelaksanaan",
			EmployeeStartDate:   "01/04/2024",
			EmployeeEndDate:     "06/04/2024",
		},
		{
			EmployeeID:          1,
			EmployeeTitle:       "MCU Eselon 2",
			EmployeeDescription: "Tanggal Pelaksanaan",
			EmployeeStartDate:   "01/04/2024",
			EmployeeEndDate:     "06/04/2024",
		},
	}

	return data, nil
}
