rawmaterial

package
v0.0.0-...-e40fed1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(ctx context.Context, db *mongo.Database, id primitive.ObjectID) (interface{}, error)

func List

func List(ctx context.Context, db *mongo.Database) (*[]*RawMaterial, error)

Types

type RawMaterial

type RawMaterial struct {
	ID       primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	RawMatID string             `bson:"rawmatid" json:"rawmatid"`
	Name     string             `bson:"name" json:"name"`
	Type     string             `bson:"type" json:"type"`
	Status   bool               `bson:"status" json:"status"`
	Detail   []bson.M           `bson:"detail" json:"detail"`
	ImageID  string             `bson:"imageid" json:"imageid"`

	CreatedTime string `json:"created_time" bson:"created_time"`
	UpdatedTime string `json:"updated_time" bson:"updated_time"`
}

func Read

func (*RawMaterial) Create

func (m *RawMaterial) Create(ctx context.Context, db *mongo.Database) (interface{}, error)

func (*RawMaterial) Update

func (doc *RawMaterial) Update(ctx context.Context, db *mongo.Database, id primitive.ObjectID) (interface{}, error)

Jump to

Keyboard shortcuts

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