storage

package
v0.0.0-...-2a611ce Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapCodingStoreToEntity

func MapCodingStoreToEntity(coding Coding) entitycoding.Coding

func MapMenuStoreToEntity

func MapMenuStoreToEntity(menu Menu) entitymenu.Menu

func MapUserStoreToEntity

func MapUserStoreToEntity(user User) entityUser.User

Types

type Coding

type Coding struct {
	gorm.Model
	CodingName string `json:"coding_name,omitempty"`
	Group      uint   `json:"group,omitempty"`
	ShowId     uint   `json:"show_id,omitempty"`
	ParentId   uint   `json:"parent_id,omitempty"`
	TypeId     uint   `json:"type_id,omitempty"`
	//to don't insert value in "updated_at" at "insert mode" :
	//see more: https://gorm.io/docs/update.html
	UpdatedAt *time.Time `json:"updated_at" gorm:"<-:update"`
}

func MapEntityToCodingStore

func MapEntityToCodingStore(input entitycoding.Coding) Coding
type Menu struct {
	gorm.Model
	MenuName string `json:"menu_name,omitempty"`
	Title    string `json:"title,omitempty"`
	Priority uint   `json:"priority,omitempty"`
	Tooltip  string `json:"tooltip,omitempty"`
	Icon     string `json:"icon,omitempty"`
	Group    uint   `json:"group,omitempty"`
	Parent   uint   `json:"parent,omitempty"`
	State    uint   `json:"state,omitempty"`
	UiUrl    string `json:"ui_url,omitempty"`
	//to don't insert value in "updated_at" at "insert mode" :
	//see more: https://gorm.io/docs/update.html
	UpdatedAt *time.Time `json:"updated_at" gorm:"<-:update"`
}

func MapEntityToMenuStore

func MapEntityToMenuStore(input entitymenu.Menu) Menu

type User

type User struct {
	gorm.Model
	Username   string    `gorm:"unique; not null" json:"username"`
	Password   string    `json:"password"`
	Email      string    `json:"email"`
	DOB        time.Time `json:"dob"`
	MobileNo   string    `json:"mobile_no"`
	NationalID string    `json:"national_id"`
	//to don't insert value in "updated_at" at "insert mode" :
	//see more: https://gorm.io/docs/update.html
	UpdatedAt *time.Time `json:"updated_at" gorm:"<-:update"`
}

func MapEntityToUserStore

func MapEntityToUserStore(input entityUser.User) User

Jump to

Keyboard shortcuts

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