package model

import "time"

// Task represent a task - the building block of the TaskManager app
type Task struct {
	ID        int64     `storm:"id,increment" db:"id" json:"id"`
	TenantID  int64     `db:"tenant_id" json:"tenant_id"`
	UserID    int64     `db:"user_id" json:"user_id"`
	ProjectID int64     `storm:"index" db:"project_id" json:"project_id"`
	UUID      string    `storm:"unique" db:"uuid" json:"uuid,omitempty"`
	Title     string    `db:"title" json:"text"`
	Details   string    `db:"details" json:"notes"`
	Completed bool      `storm:"index" db:"completed" json:"completed"`
	DueDate   *int64    `storm:"index" db:"due_date" json:"due_date,omitempty"`
	CreatedAt time.Time `db:"created_at" json:"created_at"`
	UpdatedAt time.Time `db:"updated_at" json:"updated_at"`
}
