db

package
v0.0.0-...-064c0d0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GenderMale   = true
	GenderFemale = false
)

Variables

View Source
var (
	DB *gorm.DB
)

Functions

func InitConn

func InitConn(conf config.DBConf, logger echo.Logger)

Types

type Customer

type Customer struct {
	ID        uuid.UUID  `gorm:"column:id;primaryKey;type:uuid;not null"`
	FirstName string     `gorm:"column:first_name;type:varchar(100);not null"`
	LastName  string     `gorm:"column:last_name;type:varchar(100);not null"`
	BirthDate time.Time  `gorm:"column:birth_date;type:date;not null"`
	Gender    bool       `gorm:"column:gender;type:boolean;not null"`
	Email     string     `gorm:"column:email;type:varchar(255);not null"`
	Address   *string    `gorm:"column:address;type:varchar(200);default:null"`
	CreatedAt time.Time  `gorm:"column:created_at;type:timestamp without time zone;not null"`
	UpdatedAt time.Time  `gorm:"column:updated_at;type:timestamp without time zone;not null"`
	DeletedAt *time.Time `gorm:"column:deleted_at;type:timestamp without time zone;default:null;index"`
}

func (*Customer) FullName

func (c *Customer) FullName() string

Jump to

Keyboard shortcuts

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