package domain

import "time"

type ReportedIssueType string

var (
	ISSUE_TYPE_COURSE          ReportedIssueType = "course"
	ISSUE_TYPE_VIDEO           ReportedIssueType = "video"
	ISSUE_TYPE_SUBSCRIPTION    ReportedIssueType = "subscription"
	ISSUE_TYPE_PAYMENT         ReportedIssueType = "payment"
	ISSUE_TYPE_ACCOUNT         ReportedIssueType = "account"
	ISSUE_TYPE_LOGIN           ReportedIssueType = "login"
	ISSUE_TYPE_CONTENT         ReportedIssueType = "content"
	ISSUE_TYPE_PERFORMANCE     ReportedIssueType = "performance"
	ISSUE_TYPE_ACCESSIBILITY   ReportedIssueType = "accessibility"
	ISSUE_TYPE_FEATURE_REQUEST ReportedIssueType = "feature_request"
	ISSUE_TYPE_BUG             ReportedIssueType = "bug"
	ISSUE_TYPE_OTHER           ReportedIssueType = "other"
)

type ReportedIssueStatus string

var (
	ISSUE_STATUS_PENDING     ReportedIssueStatus = "pending"
	ISSUE_STATUS_IN_PROGRESS ReportedIssueStatus = "in_progress"
	ISSUE_STATUS_RESOLVED    ReportedIssueStatus = "resolved"
	ISSUE_STATUS_REJECTED    ReportedIssueStatus = "rejected"
)

type ReportedIssue struct {
	ID          int64                  `json:"id"`
	UserID      int64                  `json:"user_id"`
	UserRole    Role                   `json:"user_role"`
	Subject     string                 `json:"subject"`
	Description string                 `json:"description"`
	IssueType   ReportedIssueType      `json:"issue_type"`
	Status      ReportedIssueStatus    `json:"status"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
	CreatedAt   time.Time              `json:"created_at"`
	UpdatedAt   time.Time              `json:"updated_at"`
}

type ReportedIssueReq struct {
	ID          int64                  `json:"id"`
	Subject     string                 `json:"subject"`
	Description string                 `json:"description"`
	IssueType   ReportedIssueType      `json:"issue_type"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}
