model

package
v0.0.0-...-b174aef Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteEmployee

func DeleteEmployee(id string) error

func SetDB

func SetDB(database *mongo.Database)

Types

type Employee

type Employee struct {
	ID     string `bson:"_id,omitempty"`
	Name   string `bson:"name"`
	Salary string `bson:"salary"`
	Age    string `bson:"age"`
}

func GetAllEmployees

func GetAllEmployees() ([]Employee, error)

func GetEmployeeById

func GetEmployeeById(id string) (*Employee, error)

func (*Employee) CreateEmployee

func (e *Employee) CreateEmployee() (*Employee, error)

func (*Employee) UpdateEmployee

func (e *Employee) UpdateEmployee() error

Jump to

Keyboard shortcuts

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