Skip to content

Commit

Permalink
feat: updated git model
Browse files Browse the repository at this point in the history
  • Loading branch information
tikazyq committed Jun 21, 2024
1 parent 9e40072 commit 725ee7d
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions core/models/models/git_v2.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
package models

import (
"github.com/crawlab-team/crawlab/vcs"
"time"
)

type GitV2 struct {
any `collection:"gits"`
BaseModelV2[GitV2] `bson:",inline"`
Url string `json:"url" bson:"url"`
Name string `json:"name" bson:"name"`
AuthType string `json:"auth_type" bson:"auth_type"`
Username string `json:"username" bson:"username"`
Password string `json:"password" bson:"password"`
CurrentBranch string `json:"current_branch" bson:"current_branch"`
Status string `json:"status" bson:"status"`
Error string `json:"error" bson:"error"`
Spiders []SpiderV2 `json:"spiders,omitempty" bson:"-"`
Url string `json:"url" bson:"url"`
Name string `json:"name" bson:"name"`
AuthType string `json:"auth_type" bson:"auth_type"`
Username string `json:"username" bson:"username"`
Password string `json:"password" bson:"password"`
CurrentBranch string `json:"current_branch" bson:"current_branch"`
Status string `json:"status" bson:"status"`
Error string `json:"error" bson:"error"`
Spiders []SpiderV2 `json:"spiders,omitempty" bson:"-"`
Refs []vcs.GitRef `json:"refs" bson:"refs"`
RefsUpdatedAt time.Time `json:"refs_updated_at" bson:"refs_updated_at"`

// settings
AutoPull bool `json:"auto_pull" bson:"auto_pull"`
Expand Down

0 comments on commit 725ee7d

Please sign in to comment.