add commit model
parent
6ea9642d64
commit
b2db4afe77
|
@ -0,0 +1,27 @@
|
||||||
|
// Copyright 2016 The Gogs Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a MIT-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package models
|
||||||
|
|
||||||
|
import (
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Commit struct {
|
||||||
|
ID int64
|
||||||
|
RepoID int64 `xorm:"UNIQUE(commit_repo_sha)"`
|
||||||
|
Sha string `xorm:"VARCHAR(40) UNIQUE(commit_repo_sha)"`
|
||||||
|
Message string
|
||||||
|
AuthorEmail string
|
||||||
|
AuthorName string
|
||||||
|
AuthorTime time.Time
|
||||||
|
CommitterEmail string
|
||||||
|
CommitterName string
|
||||||
|
CommitterTime time.Time
|
||||||
|
}
|
||||||
|
|
||||||
|
type CommitParent struct {
|
||||||
|
ParentId int64 `xorm:"pk"`
|
||||||
|
ChildId int64 `xorm:"pk"`
|
||||||
|
}
|
|
@ -72,7 +72,7 @@ func init() {
|
||||||
new(Mirror), new(Release), new(LoginSource), new(Webhook), new(HookTask),
|
new(Mirror), new(Release), new(LoginSource), new(Webhook), new(HookTask),
|
||||||
new(ProtectBranch), new(ProtectBranchWhitelist),
|
new(ProtectBranch), new(ProtectBranchWhitelist),
|
||||||
new(Team), new(OrgUser), new(TeamUser), new(TeamRepo),
|
new(Team), new(OrgUser), new(TeamUser), new(TeamRepo),
|
||||||
new(Notice), new(EmailAddress))
|
new(Notice), new(EmailAddress), new(Commit), new(CommitParent))
|
||||||
|
|
||||||
gonicNames := []string{"SSL"}
|
gonicNames := []string{"SSL"}
|
||||||
for _, name := range gonicNames {
|
for _, name := range gonicNames {
|
||||||
|
|
Loading…
Reference in New Issue