entity

package
v0.0.0-...-418b934 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2020 License: GPL-3.0 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:uuid;primary_key;unique_index"`
	CreatedAt      time.Time
	UpdatedAt      time.Time
	DeletedAt      *time.Time
	LastModifiedBy string
}

Base gorm base

func (*Base) BeforeCreate

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

BeforeCreate will set a UUID rather than numeric ID.

func (*Base) MarshalBinary

func (base *Base) MarshalBinary() ([]byte, error)

MarshalBinary for redis

func (*Base) UnmarshalBinary

func (base *Base) UnmarshalBinary(data []byte) error

UnmarshalBinary for redis

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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