25 lines
414 B
Go
25 lines
414 B
Go
package psql
|
|
|
|
import (
|
|
"kurumibot/database"
|
|
|
|
"github.com/shopspring/decimal"
|
|
)
|
|
|
|
type Group struct {
|
|
ID int
|
|
Name string
|
|
IsAdmin bool
|
|
IsVip bool
|
|
IsTester bool
|
|
Multiplier decimal.Decimal
|
|
Sale decimal.Decimal
|
|
MaxWaifus int
|
|
}
|
|
|
|
func GetGroupById(id int) (*Group, error) {
|
|
group := new(Group)
|
|
tx := database.PostgresDatabase.First(group, "id = ?", id)
|
|
return group, tx.Error
|
|
}
|