model

package
v0.0.0-...-9852df5 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

type Base struct {
	ID        uuid.UUID `gorm:"type:char(36);primary_key"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt *time.Time `sql:"index"`
}

Base contains common columns for all tables.

func (*Base) BeforeCreate

func (base *Base) BeforeCreate(scope *gorm.Scope) error

BeforeCreate This functions are called before creating Base

type Configuration

type Configuration struct {
	Database Database
}

type Database

type Database struct {
	User         string
	Password     string
	Protocol     string
	DatabaseType string
	DatabaseName string
}

type PatchUser

type PatchUser struct {
	Name  string `json:"name"`
	Email string `json:"email"`
}

type User

type User struct {
	Base
	Name  string `json:"name"  validate:"required"`
	Email string `json:"email"`
}

Jump to

Keyboard shortcuts

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