groupModel

This commit is contained in:
wangchuxiao
2023-01-17 17:49:29 +08:00
13 changed files with 315 additions and 157 deletions
+11
View File
@@ -8,6 +8,17 @@ import (
"time"
)
type GroupModelInterface interface {
//mysql
Create(ctx context.Context, groups []*Group) (err error)
Delete(ctx context.Context, groupIDs []string, tx ...*gorm.DB) (err error)
UpdateByMap(ctx context.Context, groupID string, args map[string]interface{}) (err error)
Update(ctx context.Context, groups []*Group) (err error)
Find(ctx context.Context, groupIDs []string) (groups []*Group, err error)
Take(ctx context.Context, groupID string) (group *Group, err error)
//mongo
}
type Group struct {
GroupID string `gorm:"column:group_id;primary_key;size:64" json:"groupID" binding:"required"`
GroupName string `gorm:"column:name;size:255" json:"groupName"`