refactor backend packages and global db service
This commit is contained in:
19
backend/internal/models/inbox_item.go
Normal file
19
backend/internal/models/inbox_item.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
type SenlinAgentInboxItem struct {
|
||||
ID uint `gorm:"primaryKey"`
|
||||
ProjectID uint `gorm:"index;not null"`
|
||||
CreatedBy uint `gorm:"index;not null"`
|
||||
SourceType string `gorm:"not null"`
|
||||
Title string
|
||||
Body string
|
||||
Status string `gorm:"not null;default:open"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
func (SenlinAgentInboxItem) TableName() string {
|
||||
return "senlin_agent_inbox_items"
|
||||
}
|
||||
Reference in New Issue
Block a user