19 lines
332 B
Go
19 lines
332 B
Go
package database
|
|
|
|
import "context"
|
|
|
|
type GroupPermission struct {
|
|
GroupID int32 `bun:",notnull" json:"-"`
|
|
Value int8 `bun:",notnull" json:"value"`
|
|
}
|
|
|
|
func InsertGroupPermissions(gp []*GroupPermission) error {
|
|
ctx := context.Background()
|
|
_, err := PG.NewInsert().
|
|
Model(&gp).
|
|
Returning("NULL").
|
|
Exec(ctx)
|
|
|
|
return err
|
|
}
|