优化stream #8 (#9)

This commit is contained in:
Sakurasan
2023-05-25 20:03:24 +08:00
committed by GitHub
parent 01f4e90c2b
commit 6bdc38aa5a
7 changed files with 83 additions and 14 deletions

View File

@@ -3,12 +3,15 @@ package store
import "time"
type Key struct {
ID uint `gorm:"primarykey" json:"id,omitempty"`
Key string `gorm:"unique;not null" json:"key,omitempty"`
Name string `gorm:"unique;not null" json:"name,omitempty"`
UserId string `json:"-,omitempty"`
CreatedAt time.Time `json:"createdAt,omitempty"`
UpdatedAt time.Time `json:"updatedAt,omitempty"`
ID uint `gorm:"primarykey" json:"id,omitempty"`
Key string `gorm:"unique;not null" json:"key,omitempty"`
Name string `gorm:"unique;not null" json:"name,omitempty"`
UserId string `json:"-,omitempty"`
KeyType string
EndPoint string
DeploymentName string
CreatedAt time.Time `json:"createdAt,omitempty"`
UpdatedAt time.Time `json:"updatedAt,omitempty"`
}
func GetKeyrByName(name string) (*Key, error) {