Skip to content

Commit ebf8db0

Browse files
committed
Remove needless field
1 parent e217c63 commit ebf8db0

1 file changed

Lines changed: 25 additions & 26 deletions

File tree

builder/store/database/repository.go

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -168,32 +168,31 @@ type Repository struct {
168168
Labels string `bun:",nullzero" json:"labels"`
169169
License string `bun:",nullzero" json:"license"`
170170
// Depreated
171-
Readme string `bun:",nullzero" json:"readme"`
172-
DefaultBranch string `bun:",notnull" json:"default_branch"`
173-
LfsFiles []LfsFile `bun:"rel:has-many,join:id=repository_id" json:"-"`
174-
Likes int64 `bun:",nullzero" json:"likes"`
175-
DownloadCount int64 `bun:",nullzero" json:"download_count"`
176-
Downloads []RepositoryDownload `bun:"rel:has-many,join:id=repository_id" json:"downloads"`
177-
Tags []Tag `bun:"m2m:repository_tags,join:Repository=Tag" json:"tags"`
178-
Metadata Metadata `bun:"rel:has-one,join:id=repository_id" json:"metadata"`
179-
Mirror Mirror `bun:"rel:has-one,join:id=repository_id" json:"mirror"`
180-
RepositoryType types.RepositoryType `bun:",notnull" json:"repository_type"`
181-
HTTPCloneURL string `bun:",nullzero" json:"http_clone_url"`
182-
SSHCloneURL string `bun:",nullzero" json:"ssh_clone_url"`
183-
Source types.RepositorySource `bun:",nullzero,default:'local'" json:"source"`
184-
SyncStatus types.RepositorySyncStatus `bun:",nullzero" json:"sync_status"` // Only used for multi-source sync status
185-
SensitiveCheckStatus types.SensitiveCheckStatus `bun:",default:0" json:"sensitive_check_status"`
186-
MSPath string `bun:",nullzero" json:"ms_path"`
187-
CSGPath string `bun:",nullzero" json:"csg_path"`
188-
HFPath string `bun:",nullzero" json:"hf_path"`
189-
GithubPath string `bun:",nullzero" json:"github_path"`
190-
LFSObjectsSize int64 `bun:",nullzero" json:"lfs_objects_size"`
191-
StarCount int `bun:",nullzero" json:"star_count"`
192-
DeletedAt time.Time `bun:",soft_delete,nullzero"`
193-
Migrated bool `bun:"," json:"migrated"`
194-
Hashed bool `bun:"," json:"hashed"`
195-
XnetEnabled bool `bun:"," json:"xnet_enabled"`
196-
CurrentXnetMigrationTaskID int64 `bun:"," json:"current_xnet_migration_task_id"`
171+
Readme string `bun:",nullzero" json:"readme"`
172+
DefaultBranch string `bun:",notnull" json:"default_branch"`
173+
LfsFiles []LfsFile `bun:"rel:has-many,join:id=repository_id" json:"-"`
174+
Likes int64 `bun:",nullzero" json:"likes"`
175+
DownloadCount int64 `bun:",nullzero" json:"download_count"`
176+
Downloads []RepositoryDownload `bun:"rel:has-many,join:id=repository_id" json:"downloads"`
177+
Tags []Tag `bun:"m2m:repository_tags,join:Repository=Tag" json:"tags"`
178+
Metadata Metadata `bun:"rel:has-one,join:id=repository_id" json:"metadata"`
179+
Mirror Mirror `bun:"rel:has-one,join:id=repository_id" json:"mirror"`
180+
RepositoryType types.RepositoryType `bun:",notnull" json:"repository_type"`
181+
HTTPCloneURL string `bun:",nullzero" json:"http_clone_url"`
182+
SSHCloneURL string `bun:",nullzero" json:"ssh_clone_url"`
183+
Source types.RepositorySource `bun:",nullzero,default:'local'" json:"source"`
184+
SyncStatus types.RepositorySyncStatus `bun:",nullzero" json:"sync_status"` // Only used for multi-source sync status
185+
SensitiveCheckStatus types.SensitiveCheckStatus `bun:",default:0" json:"sensitive_check_status"`
186+
MSPath string `bun:",nullzero" json:"ms_path"`
187+
CSGPath string `bun:",nullzero" json:"csg_path"`
188+
HFPath string `bun:",nullzero" json:"hf_path"`
189+
GithubPath string `bun:",nullzero" json:"github_path"`
190+
LFSObjectsSize int64 `bun:",nullzero" json:"lfs_objects_size"`
191+
StarCount int `bun:",nullzero" json:"star_count"`
192+
DeletedAt time.Time `bun:",soft_delete,nullzero"`
193+
Migrated bool `bun:"," json:"migrated"`
194+
Hashed bool `bun:"," json:"hashed"`
195+
XnetEnabled bool `bun:"," json:"xnet_enabled"`
197196

198197
// updated_at timestamp will be updated only if files changed
199198
times

0 commit comments

Comments
 (0)