ticket

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Pending   = 1 // Pending  # Pending follow up
	Waiting   = 2 // Waiting  # Waiting for user response
	Processed = 3 // Processed
	Closed    = 4 // Closed
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Details

type Details struct {
	Id          int64     `gorm:"primaryKey"`
	Title       string    `gorm:"type:varchar(255);not null;default:'';comment:Title"`
	Description string    `gorm:"type:text;comment:Description"`
	UserId      int64     `gorm:"type:bigint;not null;default:0;comment:UserId"`
	Status      uint8     `gorm:"type:tinyint(1);not null;default:1;comment:Status"`
	Follows     []Follow  `gorm:"foreignKey:TicketId;references:Id"`
	CreatedAt   time.Time `gorm:"<-:create;comment:Create Time"`
	UpdatedAt   time.Time `gorm:"comment:Update Time"`
}

type Follow

type Follow struct {
	Id        int64     `gorm:"primaryKey"`
	TicketId  int64     `gorm:"type:bigint;not null;default:0;comment:TicketId"`
	From      string    `gorm:"type:varchar(255);not null;default:'';comment:From"`
	Type      uint8     `gorm:"type:tinyint(1);not null;default:1;comment:Type: 1 text, 2 image"`
	Content   string    `gorm:"type:text;comment:Content"`
	CreatedAt time.Time `gorm:"<-:create;comment:Create Time"`
}

func (Follow) TableName

func (Follow) TableName() string

type Model

type Model interface {
	// contains filtered or unexported methods
}

func NewModel

func NewModel(conn *gorm.DB, c *redis.Client) Model

NewModel returns a model for the database table.

type Ticket

type Ticket struct {
	Id          int64     `gorm:"primaryKey"`
	Title       string    `gorm:"type:varchar(255);not null;default:'';comment:Title"`
	Description string    `gorm:"type:text;comment:Description"`
	UserId      int64     `gorm:"type:bigint;not null;default:0;comment:UserId"`
	Status      uint8     `gorm:"type:tinyint(1);not null;default:1;comment:Status"`
	CreatedAt   time.Time `gorm:"<-:create;comment:Create Time"`
	UpdatedAt   time.Time `gorm:"comment:Update Time"`
}

func (Ticket) TableName

func (Ticket) TableName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL