mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
refactor: Remove unused code and update models and functions for notification channels and settings
This commit is contained in:
12
core/models/models/v2/notification_request_v2.go
Normal file
12
core/models/models/v2/notification_request_v2.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package models
|
||||
|
||||
import "go.mongodb.org/mongo-driver/bson/primitive"
|
||||
|
||||
type NotificationRequestV2 struct {
|
||||
any `collection:"notification_requests"`
|
||||
BaseModelV2[NotificationRequestV2] `bson:",inline"`
|
||||
Status string `json:"status" bson:"status"`
|
||||
Error string `json:"error,omitempty" bson:"error,omitempty"`
|
||||
SettingId primitive.ObjectID `json:"setting_id" bson:"setting_id"`
|
||||
ChannelId primitive.ObjectID `json:"channel_id" bson:"channel_id"`
|
||||
}
|
||||
@@ -19,5 +19,4 @@ type ScheduleV2 struct {
|
||||
NodeIds []primitive.ObjectID `json:"node_ids" bson:"node_ids"`
|
||||
Priority int `json:"priority" bson:"priority"`
|
||||
Enabled bool `json:"enabled" bson:"enabled"`
|
||||
UserId primitive.ObjectID `json:"user_id" bson:"user_id"`
|
||||
}
|
||||
|
||||
@@ -2,7 +2,6 @@ package models
|
||||
|
||||
import (
|
||||
"go.mongodb.org/mongo-driver/bson/primitive"
|
||||
"time"
|
||||
)
|
||||
|
||||
type TaskV2 struct {
|
||||
@@ -26,5 +25,4 @@ type TaskV2 struct {
|
||||
SubTasks []TaskV2 `json:"sub_tasks,omitempty" bson:"-"`
|
||||
Spider *SpiderV2 `json:"spider,omitempty" bson:"-"`
|
||||
UserId primitive.ObjectID `json:"-" bson:"-"`
|
||||
CreateTs time.Time `json:"create_ts" bson:"create_ts"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user