// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.
// Code generated by gorm.io/gen. DO NOT EDIT.

package model

import (
	"database/sql"
	"time"
)

const TableNameQueueJob = "queue_jobs"

// QueueJob mapped from table <queue_jobs>
type QueueJob struct {
	ID               string         `gorm:"column:id;primaryKey;default:gen_random_uuid();<-:false" json:"id"`
	Fingerprint      string         `gorm:"column:fingerprint;not null;<-:create" json:"fingerprint"`
	Queue            string         `gorm:"column:queue;not null;<-:create" json:"queue"`
	Status           QueueJobStatus `gorm:"column:status;not null;default:pending" json:"status"`
	Payload          string         `gorm:"column:payload;not null;<-:create" json:"payload"`
	Retries          uint           `gorm:"column:retries;not null" json:"retries"`
	MaxRetries       uint           `gorm:"column:max_retries;not null;<-:create" json:"maxRetries"`
	RunAfter         time.Time      `gorm:"column:run_after;not null" json:"runAfter"`
	RanAt            sql.NullTime   `gorm:"column:ran_at" json:"ranAt"`
	Error            NullString     `gorm:"column:error" json:"error"`
	Deadline         sql.NullTime   `gorm:"column:deadline;<-:create" json:"deadline"`
	ArchivalDuration Duration       `gorm:"column:archival_duration;not null;<-:create" json:"archivalDuration"`
	CreatedAt        time.Time      `gorm:"column:created_at;not null;<-:create" json:"createdAt"`
	Priority         int            `gorm:"column:priority;not null" json:"priority"`
}

// TableName QueueJob's table name
func (*QueueJob) TableName() string {
	return TableNameQueueJob
}
