You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/07/21 06:49:10 UTC

[GitHub] [incubator-devlake] xgdyp commented on a diff in pull request #2504: feat: add relationship with commit files and its components

xgdyp commented on code in PR #2504:
URL: https://github.com/apache/incubator-devlake/pull/2504#discussion_r926312055


##########
models/domainlayer/code/commit.go:
##########
@@ -45,13 +46,33 @@ func (Commit) TableName() string {
 }
 
 type CommitFile struct {
-	common.NoPKModel
-	CommitSha string `gorm:"primaryKey;type:varchar(40)"`
-	FilePath  string `gorm:"primaryKey;type:varchar(255)"`
+	domainlayer.DomainEntity
+	CommitSha string `gorm:"type:varchar(40)"`
+	FilePath  string `gorm:"type:varchar(255)"`
 	Additions int
 	Deletions int
 }
 
 func (CommitFile) TableName() string {
 	return "commit_files"
 }
+
+type Component struct {

Review Comment:
   I think it can be replaced in gitextractor plugin's model file, what do you think?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org