Lee-WineList/repository/oauth2_client.go

24 lines
467 B
Go
Raw Normal View History

2023-04-27 15:56:12 +08:00
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
}