Lee-WineList/repository/oauth2_client.go
2023-04-27 15:56:12 +08:00

24 lines
467 B
Go

package repository
import (
"Lee-WineList/client"
"Lee-WineList/model/entity"
)
type oauth2Client struct{}
// OAuth2Client ...
func OAuth2Client() *oauth2Client {
return &oauth2Client{}
}
// FinAll 查询所有客户端
func (oauth2Client) FinAll(clients *[]entity.OAuth2Client) error {
return client.MySQL.Find(&clients).Error
}
// FindOne 查询某一个
func (oauth2Client) FindOne(c *entity.OAuth2Client) error {
return client.MySQL.Take(&c, c).Error
}