mirror of
https://github.com/nezhahq/nezha.git
synced 2025-01-22 12:48:14 -05:00
model redesign
This commit is contained in:
parent
843ecdaa33
commit
4fc0aad7a0
6
model/notification_group.go
Normal file
6
model/notification_group.go
Normal file
@ -0,0 +1,6 @@
|
||||
package model
|
||||
|
||||
type NotificationGroup struct {
|
||||
Common
|
||||
Name string `json:"name"`
|
||||
}
|
7
model/notification_group_notification.go
Normal file
7
model/notification_group_notification.go
Normal file
@ -0,0 +1,7 @@
|
||||
package model
|
||||
|
||||
type NotificationGroupNotification struct {
|
||||
Common
|
||||
NotificationGroupID uint64 `json:"notification_group_id"`
|
||||
NotificationID uint64 `json:"notification_id"`
|
||||
}
|
@ -7,9 +7,10 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
|
||||
"github.com/naiba/nezha/pkg/utils"
|
||||
pb "github.com/naiba/nezha/proto"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Server struct {
|
||||
|
6
model/server_group.go
Normal file
6
model/server_group.go
Normal file
@ -0,0 +1,6 @@
|
||||
package model
|
||||
|
||||
type ServerGroup struct {
|
||||
Common
|
||||
Name string `json:"name"`
|
||||
}
|
7
model/server_group_server.go
Normal file
7
model/server_group_server.go
Normal file
@ -0,0 +1,7 @@
|
||||
package model
|
||||
|
||||
type ServerGroupServer struct {
|
||||
Common
|
||||
ServerGroupId uint64 `json:"server_group_id"`
|
||||
ServerId uint64 `json:"server_id"`
|
||||
}
|
6
model/user_group.go
Normal file
6
model/user_group.go
Normal file
@ -0,0 +1,6 @@
|
||||
package model
|
||||
|
||||
type UserGroup struct {
|
||||
Common
|
||||
Name string `json:"name"`
|
||||
}
|
7
model/user_group_user.go
Normal file
7
model/user_group_user.go
Normal file
@ -0,0 +1,7 @@
|
||||
package model
|
||||
|
||||
type UserGroupUser struct {
|
||||
Common
|
||||
UserGroupId uint64 `json:"user_group_id"`
|
||||
UserId uint64 `json:"user_id"`
|
||||
}
|
Loading…
Reference in New Issue
Block a user