16 lines
882 B
Go
16 lines
882 B
Go
package models
|
|
|
|
import "time"
|
|
|
|
type Repository struct {
|
|
ID int64 `xorm:"'id' pk autoincr" json:"id"`
|
|
OwnerID int64 `xorm:"'owner_id' notnull index" json:"ownerId"`
|
|
Name string `xorm:"'name' notnull varchar(100)" json:"name"`
|
|
Description string `xorm:"'description' varchar(500)" json:"description"`
|
|
IsPrivate bool `xorm:"'is_private' default false" json:"isPrivate"`
|
|
DefaultBranch string `xorm:"'default_branch' default 'main' varchar(255)" json:"defaultBranch"`
|
|
DiskPath string `xorm:"'disk_path' notnull" json:"-"`
|
|
CreatedAt time.Time `xorm:"'created_at' created" json:"createdAt"`
|
|
UpdatedAt time.Time `xorm:"'updated_at' updated" json:"updatedAt"`
|
|
}
|