feat: wrap message by fluent ui toast

This commit is contained in:
zhaoyupeng
2024-09-27 14:52:10 +08:00
parent 77dff6649d
commit b2c13508f4
27 changed files with 677 additions and 102 deletions

9
internal/model/init.go Normal file
View File

@ -0,0 +1,9 @@
package model
import "gorm.io/gorm"
func Init(tx *gorm.DB) error {
return tx.AutoMigrate(
&Connection{},
)
}

18
internal/model/s3.go Normal file
View File

@ -0,0 +1,18 @@
package model
import "gorm.io/gorm"
type Connection struct {
Id uint64 `json:"id" gorm:"primaryKey;column:id"`
CreatedAt int64 `json:"created_at" gorm:"column:created_at;autoCreateTime:milli"`
UpdatedAt int64 `json:"updated_at" gorm:"column:updated_at;autoUpdateTime:milli"`
DeletedAt int64 `json:"deleted_at" gorm:"index;column:deleted_at;default:0"`
Name string `json:"name" gorm:"unique;column:name"`
Endpoint string `json:"endpoint" gorm:"column:endpoint"`
Access string `json:"access" gorm:"column:access"`
Key string `json:"key" gorm:"column:key"`
}
func (c *Connection) Create(tx *gorm.DB) error {
return tx.Create(c).Error
}