models

package
v0.0.0-...-46813e3 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddWord

func AddWord(data map[string]interface{}) (int, error)

func CleanAllWord

func CleanAllWord() error

func DeleteWord

func DeleteWord(id int) error

func EditWord

func EditWord(id int, data interface{}) error

func ExistWordByID

func ExistWordByID(id int) (bool, error)

func Setup

func Setup()

Types

type Model

type Model struct {
	ID         int `gorm:"primary_key" json:"id"`
	CreatedOn  int `json:"created_on"`
	ModifiedOn int `json:"modified_on"`
	DeletedOn  int `json:"deleted_on"`
}

type Word

type Word struct {
	Model

	Title      string `json:"title"`
	Desc       string `json:"desc"`
	CreatedBy  string `json:"created_by"`
	ModifiedBy string `json:"modified_by"`
}

func GetWord

func GetWord(id int) (*Word, error)

func GetWords

func GetWords(maps interface{}) ([]*Word, error)

Jump to

Keyboard shortcuts

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