Skip to content
Snippets Groups Projects
models.go 1017 B
Newer Older
  • Learn to ignore specific revisions
  • import "time"
    
    
    // User represents a user from the database.
    type User struct {
    
    Dean's avatar
    Dean committed
    	ID             string `json:"id"`
    	Username       string `json:"username"`
    	Email          string `json:"email"`
    	IsAdmin        bool   `json:"is_admin"`
    	IsBlocked      bool   `json:"is_blocked"`
    	BucketCapacity int64  `json:"-"`
    
    
    // Object represents an object from the database.
    type Object struct {
    	Bucket         string     `json:"bucket"`
    	Key            string     `json:"key"`
    	Directory      string     `json:"dir"`
    	Type           int        `json:"type"`
    	DestURL        *string    `json:"dest_url"`
    	ContentType    *string    `json:"content_type"`
    	ContentLength  *int64     `json:"content_length"`
    	CreatedAt      time.Time  `json:"created_at"`
    	DeletedAt      *time.Time `json:"deleted_at"`
    	DeleteReason   *string    `json:"delete_reason"`
    	AssociatedUser *string    `json:"-"`
    	MD5Hash        *string    `json:"md5_hash"`
    
    	AssociatedWithCurrentUser *bool `json:"associated_with_current_user,omitempty"`
    }