models

package
v0.0.0-...-fca68c0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 20, 2014 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Engine *xorm.Engine

Functions

func InitDb

func InitDb()

InitDb initializes the database.

Types

type Comment

type Comment struct {
	Id         int64
	Repository int64     `xorm:"not null repository_id"`
	User       int64     `xorm:"not null user_id"`
	Tag        int64     `xorm:"tag_id"`
	Content    string    `xorm:"text"`
	Created    time.Time `xorm:"created"`
	Updated    time.Time `xorm:"updated"`
	Version    int       `xorm:"version"`
}

type Image

type Image struct {
	Id         int64
	ImageId    string    `xorm:"unique not null"`
	JSON       string    `xorm:"text 'json'"`
	ParentJSON string    `xorm:"text 'parent_json'"`
	Checksum   string    `xorm:"text"`
	Payload    string    `xorm:"text"`
	URLs       string    `xorm:"text 'urls'"`
	Size       int64     `xorm:"default 0"`
	Uploaded   bool      `xorm:"default 0 'uploaded'"`
	CheckSumed bool      `xorm:"default 0 'checksumed'"`
	Created    time.Time `xorm:"created"`
	Updated    time.Time `xorm:"updated"`
	Version    int       `xorm:"version"`
}

type Member

type Member struct {
	Id             int64
	OrganizationId int64     `xorm:"not null 'organization_id'"`
	UserId         int64     `xorm:"not null 'user_id'"`
	Actived        bool      `xorm:"default 0"`
	Created        time.Time `xorm:"created"`
	Updated        time.Time `xorm:"updated"`
	Version        int       `xorm:"version"`
}

type Organization

type Organization struct {
	Id      int64
	Name    string `xorm:"unique not null"`
	Email   string
	Quota   int64     `xorm:"default 200"`
	Size    int64     `xorm:"default 4096"`
	Actived bool      `xorm:"default 0"`
	Created time.Time `xorm:"created"`
	Updated time.Time `xorm:"updated"`
	Version int       `xorm:"version"`
}

type Profile

type Profile struct {
	Id       string
	UserId   int64 `xorm:"unique not null 'user_id'"`
	Fullname string
	Company  string
	Location string
	URL      string `xorm:"text 'url'"`
	Gravatar string
	Created  time.Time `xorm:"created"`
	Updated  time.Time `xorm:"updated"`
	Version  int       `xorm:"version"`
}

type Repository

type Repository struct {
	Id          int64
	Namespace   string    `xorm:"not null"`
	Repository  string    `xorm:"not null"`
	Description string    `xorm:"text"`
	JSON        string    `xorm:"text 'json'"`
	Dockerfile  string    `xorm:"text"`
	Links       string    `xorm:"text"`
	Size        int64     `xorm:"default 0"`
	Download    int64     `xorm:"default 0"`
	Uploaded    bool      `xorm:"default 0 'uploaded'"`
	CheckSumed  bool      `xorm:"default 0 'checksumed'"`
	Star        int64     `xorm:"default 0"`
	Tags        string    `xorm:"test"`
	Trusted     bool      `xorm:"default 0"`
	Privated    bool      `xorm:"default 0"`
	Created     time.Time `xorm:"created"`
	Updated     time.Time `xorm:"updated"`
	Version     int       `xorm:"version"`
}

type Star

type Star struct {
	Id         int64
	Repository int64     `xorm:"repository_id"`
	User       int64     `xorm:"user_id"`
	Created    time.Time `xorm:"created"`
	Updated    time.Time `xorm:"updated"`
	Version    int       `xorm:"version"`
}

type Tag

type Tag struct {
	Id         int64
	Name       string    `xorm:"not null"`
	Agent      string    `xorm:"text 'agent'"`
	ImageId    string    `xorm:"text not null 'image_id'"`
	Repository int64     `xorm:"not null repository_id"`
	Created    time.Time `xorm:"created"`
	Updated    time.Time `xorm:"updated"`
	Version    int       `xorm:"version"`
}

type User

type User struct {
	Id       int64
	Username string `xorm:"unique not null"`
	Password string
	Email    string `xorm:"unique not null"`
	Token    string
	Session  string    `xorm:"unique"`
	Quota    int64     `xorm:"default 100"`
	Size     int64     `xorm:"default 2048"`
	Actived  bool      `xorm:"default false"`
	Created  time.Time `xorm:"created"`
	Updated  time.Time `xorm:"updated"`
	Version  int       `xorm:"version"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL