storage

package
v0.0.0-...-18e343d Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DBName = "travelDB.db"
	DBType = "sqlite3"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LogEntity

type LogEntity struct {
	ID          uint      `gorm:"primary_key;auto_increment;" json:"id,omitempty"`
	Title       string    `gorm:"not null" json:"title,omitempty"`
	Description string    `gorm:"default:null" json:"description,omitempty"`
	Rating      int       `gorm:"not null" json:"rating,omitempty"`
	Latitude    float64   `gorm:"not null; default:180" json:"latitude,omitempty"`
	Longitude   float64   `gorm:"not null; default:180" json:"longitude,omitempty"`
	CreatedAt   time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"created_at,omitempty"`
	UpdatedAt   time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"updated_at,omitempty"`
}

type LogEntityDaoImpl

type LogEntityDaoImpl struct {
	// contains filtered or unexported fields
}

func (*LogEntityDaoImpl) Find

func (dao *LogEntityDaoImpl) Find(condition interface{}) ([]*LogEntity, error)

func (*LogEntityDaoImpl) Migrate

func (dao *LogEntityDaoImpl) Migrate() error

func (*LogEntityDaoImpl) Save

func (dao *LogEntityDaoImpl) Save(newData *LogEntity) error

func (*LogEntityDaoImpl) Update

func (dao *LogEntityDaoImpl) Update(oldData *LogEntity, newData *LogEntity) error

type LogEntityDaoT

type LogEntityDaoT interface {
	Save(newData *LogEntity) error
	Migrate() error
	Find(condition interface{}) ([]*LogEntity, error)
	Update(oldData *LogEntity, newData *LogEntity) error
}
var LogEntityDao LogEntityDaoT

Jump to

Keyboard shortcuts

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