models

package
v1.0.1-0...-55f3d51 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	PrimaryModel
	Name     string `gorm:"type:varchar(191)" json:"name"`
	ModuleID int
	Module   Module
	TimestampModel
}

Action describes actions table

type Application

type Application struct {
	PrimaryModel
	Name string `gorm:"type:varchar(191)" json:"name"`
	TimestampModel
}

Application describes applications table

type LogEchoFile

type LogEchoFile struct {
	Source    string `json:"source"`
	Timestamp string `json:"timestamp"`
	Code      int    `json:"code"`
	Latency   string `json:"latency"`
	Method    string `json:"method"`
	Uri       string `json:"uri"`
}

LogEchoFile type

type LogErrorFile

type LogErrorFile struct {
	Source    string `json:"source"`
	Timestamp string `json:"timestamp"`
	Message   string `json:"message"`
}

LogErrorFile type

type LogFile

type LogFile struct {
	Error *LogErrorFile
	Echo  *LogEchoFile
	Sql   *LogSqlFile
}

LogFile type

type LogSqlFile

type LogSqlFile struct {
	Source     string `json:"source"`
	Timestamp  string `json:"timestamp"`
	Request    string `json:"request"`
	Latency    string `json:"latency"`
	Query      string `json:"query"`
	Parameters string `json:"parameters"`
}

LogSqlFile type

type Module

type Module struct {
	PrimaryModel
	Name          string `gorm:"type:varchar(191)" json:"name"`
	ApplicationID int
	Application   Application
	TimestampModel
}

Module describes modules table

type PrimaryModel

type PrimaryModel struct {
	ID uint64 `gorm:"primary_key" json:"id"`
}

PrimaryModel type

type SoftDeleteModel

type SoftDeleteModel struct {
	DeletedAt *time.Time `json:"deletedAt"` // * <=> nullable
}

SoftDeleteModel type

type TimestampModel

type TimestampModel struct {
	CreatedAt time.Time `json:"createdAt"`
	UpdatedAt time.Time `json:"updatedAt"`
}

TimestampModel type

type User

type User struct {
	PrimaryModel
	Username  string `gorm:"type:varchar(191);unique_index:idx_username" json:"username"`
	Password  string `gorm:"type:varchar(128);not null" json:"password"` // SHA-512
	Lastname  string `gorm:"type:varchar(100);not null" json:"lastname"`
	Firstname string `gorm:"type:varchar(100);not null" json:"firstname"`
	TimestampModel
	SoftDeleteModel
}

User describes users table

func (*User) GetFullname

func (u *User) GetFullname() string

GetFullname returns user fullname

Jump to

Keyboard shortcuts

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