package response

import (
	"time"
)

type WorkHistoryResponse struct {
	ID          uint           `json:"id"`
	UserID      uint           `json:"userId"`
	JobTitle    string         `json:"jobTitle"`
	CompanyName string         `json:"companyName"`
	StartDate   time.Time      `json:"startDate"`
	EndDate     *time.Time     `json:"endDate"`
	IsCurrent   bool           `json:"isCurrent"` // true if EndDate is null
	Duration    string         `json:"duration"`  // calculated duration string
	CreatedAt   time.Time      `json:"createdAt"`
	UpdatedAt   time.Time      `json:"updatedAt"`
	User        *UserBasicInfo `json:"user,omitempty"`
}

type UserBasicInfo struct {
	ID       uint   `json:"id"`
	Username string `json:"username"`
	Fullname string `json:"fullname"`
	Email    string `json:"email"`
}
