diff --git a/model/notification_group.go b/model/notification_group.go new file mode 100644 index 0000000..5244a01 --- /dev/null +++ b/model/notification_group.go @@ -0,0 +1,6 @@ +package model + +type NotificationGroup struct { + Common + Name string `json:"name"` +} diff --git a/model/notification_group_notification.go b/model/notification_group_notification.go new file mode 100644 index 0000000..63e20c2 --- /dev/null +++ b/model/notification_group_notification.go @@ -0,0 +1,7 @@ +package model + +type NotificationGroupNotification struct { + Common + NotificationGroupID uint64 `json:"notification_group_id"` + NotificationID uint64 `json:"notification_id"` +} diff --git a/model/server.go b/model/server.go index e0a923b..2427ae3 100644 --- a/model/server.go +++ b/model/server.go @@ -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 { diff --git a/model/server_group.go b/model/server_group.go new file mode 100644 index 0000000..db558e9 --- /dev/null +++ b/model/server_group.go @@ -0,0 +1,6 @@ +package model + +type ServerGroup struct { + Common + Name string `json:"name"` +} diff --git a/model/server_group_server.go b/model/server_group_server.go new file mode 100644 index 0000000..2786431 --- /dev/null +++ b/model/server_group_server.go @@ -0,0 +1,7 @@ +package model + +type ServerGroupServer struct { + Common + ServerGroupId uint64 `json:"server_group_id"` + ServerId uint64 `json:"server_id"` +} diff --git a/model/user_group.go b/model/user_group.go new file mode 100644 index 0000000..45b0ecf --- /dev/null +++ b/model/user_group.go @@ -0,0 +1,6 @@ +package model + +type UserGroup struct { + Common + Name string `json:"name"` +} diff --git a/model/user_group_user.go b/model/user_group_user.go new file mode 100644 index 0000000..080f35e --- /dev/null +++ b/model/user_group_user.go @@ -0,0 +1,7 @@ +package model + +type UserGroupUser struct { + Common + UserGroupId uint64 `json:"user_group_id"` + UserId uint64 `json:"user_id"` +}