phase 2 initial test
This commit is contained in:
@@ -3,13 +3,13 @@ package models
|
||||
import "time"
|
||||
|
||||
type FederationActor struct {
|
||||
ID int64 `xorm:"pk autoincr"`
|
||||
UserID int64 `xorm:"notnull unique index"`
|
||||
APID string `xorm:"notnull unique varchar(500)"` // https://instance/users/alice
|
||||
InboxURL string `xorm:"notnull varchar(500)"`
|
||||
OutboxURL string `xorm:"notnull varchar(500)"`
|
||||
PublicKey string `xorm:"text notnull"`
|
||||
PrivateKey string `xorm:"text notnull"` // AES-GCM encrypted at rest
|
||||
CreatedAt time.Time `xorm:"created"`
|
||||
UpdatedAt time.Time `xorm:"updated"`
|
||||
ID int64 `xorm:"pk autoincr" json:"id"`
|
||||
UserID int64 `xorm:"notnull unique index" json:"userId"`
|
||||
APID string `xorm:"notnull unique varchar(500)" json:"apId"`
|
||||
InboxURL string `xorm:"notnull varchar(500)" json:"inboxUrl"`
|
||||
OutboxURL string `xorm:"notnull varchar(500)" json:"outboxUrl"`
|
||||
PublicKey string `xorm:"text notnull" json:"publicKey"`
|
||||
PrivateKey string `xorm:"text notnull" json:"-"`
|
||||
CreatedAt time.Time `xorm:"created" json:"createdAt"`
|
||||
UpdatedAt time.Time `xorm:"updated" json:"updatedAt"`
|
||||
}
|
||||
|
||||
+10
-10
@@ -11,14 +11,14 @@ const (
|
||||
)
|
||||
|
||||
type PullRequest struct {
|
||||
ID int64 `xorm:"pk autoincr"`
|
||||
RepoID int64 `xorm:"notnull index"`
|
||||
AuthorID int64 `xorm:"notnull index"`
|
||||
Title string `xorm:"notnull varchar(255)"`
|
||||
Body string `xorm:"text"`
|
||||
SourceBranch string `xorm:"notnull varchar(255)"`
|
||||
TargetBranch string `xorm:"default 'main' varchar(255)"`
|
||||
Status PRStatus `xorm:"default 'open' varchar(16)"`
|
||||
CreatedAt time.Time `xorm:"created"`
|
||||
UpdatedAt time.Time `xorm:"updated"`
|
||||
ID int64 `xorm:"pk autoincr" json:"id"`
|
||||
RepoID int64 `xorm:"notnull index" json:"repoId"`
|
||||
AuthorID int64 `xorm:"notnull index" json:"authorId"`
|
||||
Title string `xorm:"notnull varchar(255)" json:"title"`
|
||||
Body string `xorm:"text" json:"body"`
|
||||
SourceBranch string `xorm:"notnull varchar(255)" json:"sourceBranch"`
|
||||
TargetBranch string `xorm:"default 'main' varchar(255)" json:"targetBranch"`
|
||||
Status PRStatus `xorm:"default 'open' varchar(16)" json:"status"`
|
||||
CreatedAt time.Time `xorm:"created" json:"createdAt"`
|
||||
UpdatedAt time.Time `xorm:"updated" json:"updatedAt"`
|
||||
}
|
||||
|
||||
@@ -3,13 +3,13 @@ package models
|
||||
import "time"
|
||||
|
||||
type Repository struct {
|
||||
ID int64 `xorm:"pk autoincr"`
|
||||
OwnerID int64 `xorm:"notnull index"`
|
||||
Name string `xorm:"notnull varchar(100)"`
|
||||
Description string `xorm:"varchar(500)"`
|
||||
IsPrivate bool `xorm:"default false"`
|
||||
DefaultBranch string `xorm:"default 'main' varchar(255)"`
|
||||
DiskPath string `xorm:"notnull"` // absolute path under REPO_ROOT
|
||||
CreatedAt time.Time `xorm:"created"`
|
||||
UpdatedAt time.Time `xorm:"updated"`
|
||||
ID int64 `xorm:"pk autoincr" json:"id"`
|
||||
OwnerID int64 `xorm:"notnull index" json:"ownerId"`
|
||||
Name string `xorm:"notnull varchar(100)" json:"name"`
|
||||
Description string `xorm:"varchar(500)" json:"description"`
|
||||
IsPrivate bool `xorm:"default false" json:"isPrivate"`
|
||||
DefaultBranch string `xorm:"default 'main' varchar(255)" json:"defaultBranch"`
|
||||
DiskPath string `xorm:"notnull" json:"-"`
|
||||
CreatedAt time.Time `xorm:"created" json:"createdAt"`
|
||||
UpdatedAt time.Time `xorm:"updated" json:"updatedAt"`
|
||||
}
|
||||
|
||||
@@ -3,12 +3,12 @@ package models
|
||||
import "time"
|
||||
|
||||
type User struct {
|
||||
ID int64 `xorm:"pk autoincr"`
|
||||
Username string `xorm:"unique notnull varchar(64)"`
|
||||
Email string `xorm:"unique notnull varchar(255)"`
|
||||
PasswordHash string `xorm:"notnull"`
|
||||
ID int64 `xorm:"pk autoincr" json:"id"`
|
||||
Username string `xorm:"unique notnull varchar(64)" json:"username"`
|
||||
Email string `xorm:"unique notnull varchar(255)" json:"email"`
|
||||
PasswordHash string `xorm:"notnull" json:"-"`
|
||||
AvatarURL string `xorm:"varchar(500)"`
|
||||
IsAdmin bool `xorm:"default false"`
|
||||
CreatedAt time.Time `xorm:"created"`
|
||||
UpdatedAt time.Time `xorm:"updated"`
|
||||
IsAdmin bool `xorm:"default false" json:"isAdmin"`
|
||||
CreatedAt time.Time `xorm:"created" json:"createdAt"`
|
||||
UpdatedAt time.Time `xorm:"updated" json:"updatedAt"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user