package issue

import (
	"madsky.ru/go-tracker/internal/model/project"
	"madsky.ru/go-tracker/internal/model/status"
	"time"
)

type Issue struct {
	ID          uint32          `json:"id"`
	Name        string          `json:"name"`
	Description *string         `json:"description"`
	Position    uint32          `json:"position"`
	Created     time.Time       `json:"created"`
	StatusID    uint32          `json:"status_id"`
	ProjectID   uint32          `json:"project_id"`
	Status      status.Status   `json:"status"`
	Project     project.Project `json:"project"`
}

type CreateIssueDTO struct {
	Name        string  `json:"name"`
	Description string  `json:"description"`
	StatusID    uint32  `json:"status_id"`
	ProjectID   uint32  `json:"project_id"`
	Position    *uint32 `json:"position"`
}

type PositionDTO struct {
	StatusId  uint32   `json:"status_id"`
	Positions []uint32 `json:"positions"`
}
