models

package
v0.0.0-...-f0bbf45 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2019 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Student

type Student struct {
	ID         string `json:"id" structs:"id"  bson:"_id" db:"id"`
	Name       string `json:"name" structs:"name"  bson:"name" db:"name"`
	Age        string `json:"age" structs:"age" bson:"age" db:"age"`
	Department string `json:"department" structs:"department" bson:"department" db:"department"`
	Grade      int    `json:"grade" structs:"grade" bson:"grade" db:"grade"`
}

Student holds information for a student

func (*Student) Map

func (s *Student) Map() map[string]interface{}

Map converts structs to a map representation

func (*Student) Names

func (s *Student) Names() []string

Names returns the field names of Student model

type Teacher

type Teacher struct {
	ID         string `json:"id" structs:"id" bson:"_id" db:"id"`
	Name       string `json:"name" structs:"name" bson:"name" db:"name"`
	Age        string `json:"age" structs:"age" bson:"age" db:"age"`
	Department string `json:"department" structs:"department" bson:"department" db:"department"`
	Salary     int    `json:"salary" structs:"salary" bson:"salary" db:"salary"`
}

Teacher holds information for a teacher

func (*Teacher) Map

func (t *Teacher) Map() map[string]interface{}

Map converts structs to a map representation

func (*Teacher) Names

func (t *Teacher) Names() []string

Names returns the field names of Teacher model

Jump to

Keyboard shortcuts

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