schema

package
v0.0.0-...-9340d71 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DBConn *gorm.DB

DBConn - Global variable of DB connection to access from anywhere.

Functions

This section is empty.

Types

type Archive

type Archive struct {
	ID        int  `gorm:"column:id;primary_key"`
	Year      int  `gorm:"column:year;not null"`
	Month     int  `gorm:"column:month;not null"`
	Status    bool `gorm:"column:status;default:false;not null"`
	IsCleaned bool `gorm:"column:is_cleaned;default:false;not null"`
	CreatedAt *time.Time
	UpdatedAt *time.Time
}

Archive Model definition for Saving meta data about downloaded archives

type User

type User struct {
	ID           uint   `gorm:"column:id;primary_key"`
	FirstName    string `gorm:"column:firstname;not null"`
	LastName     string `gorm:"column:lastname;not null"`
	UserName     string `gorm:"column:username;not null"`
	Email        string `gorm:"column:email;unique_index"`
	PasswordHash string `gorm:"column:password_hash;not null"`
	IsActive     bool   `gorm:"column:is_active;default:true;not null"`
	IsAdmin      bool   `gorm:"column:is_admin;default:false;not null"`
	IsDeleted    bool   `gorm:"column:is_deleted;default:false;not null"`
	CreatedAt    time.Time
	UpdatedAt    time.Time
	DeletedAt    *time.Time
}

User Model definition - User Defined Model

Jump to

Keyboard shortcuts

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