model

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InsertCashFlowByEntity added in v0.0.2

func InsertCashFlowByEntity(entity CashFlowEntity) primitive.ObjectID

func InsertDayFlowByDate added in v0.0.2

func InsertDayFlowByDate(date time.Time) primitive.ObjectID

func InsertDayFlowByEntity added in v0.0.2

func InsertDayFlowByEntity(entity DayFlowEntity) primitive.ObjectID

func UpdateCashFlowByEntity added in v0.0.2

func UpdateCashFlowByEntity(entity CashFlowEntity) bool

func UpdateDayFlowByEntity added in v0.0.2

func UpdateDayFlowByEntity(entity DayFlowEntity) bool

Types

type CashFlowEntity added in v0.0.2

type CashFlowEntity struct {
	Id       primitive.ObjectID `bson:"_id,omitempty"`
	Amount   float64            `json:"amount" bson:"amount"`
	Category string             `json:"category" bson:"category"`
	Desc     string             `json:"desc" bson:"desc"`
	Remark   string             `json:"remark" bson:"remark"`
}

func DeleteCashFlowByObjectId added in v0.0.2

func DeleteCashFlowByObjectId(objectId primitive.ObjectID) CashFlowEntity

func GetCashFlowByObjectId added in v0.0.2

func GetCashFlowByObjectId(objectId primitive.ObjectID) CashFlowEntity

func GetCashFlowsByObjectIdArray added in v0.0.2

func GetCashFlowsByObjectIdArray(objectIdArray []primitive.ObjectID) []CashFlowEntity

func (CashFlowEntity) IsEmpty added in v0.0.2

func (entity CashFlowEntity) IsEmpty() bool

type DayFlowEntity

type DayFlowEntity struct {
	Id        primitive.ObjectID   `bson:"_id,omitempty"`
	CashFlows []primitive.ObjectID `json:"cashFlows" bson:"cashFlows"`
	Day       int                  `json:"day" bson:"day"`
	Month     int                  `json:"month" bson:"month"`
	Year      int                  `json:"year" bson:"year"`
}

func DeleteDayFlowByDate added in v0.0.2

func DeleteDayFlowByDate(date time.Time) DayFlowEntity

func DeleteDayFlowByObjectId added in v0.0.2

func DeleteDayFlowByObjectId(objectId primitive.ObjectID) DayFlowEntity

func GetDayFlowByDate added in v0.0.2

func GetDayFlowByDate(date time.Time) DayFlowEntity

func GetDayFlowByObjectId added in v0.0.2

func GetDayFlowByObjectId(objectId primitive.ObjectID) DayFlowEntity

func (DayFlowEntity) IsEmpty added in v0.0.2

func (entity DayFlowEntity) IsEmpty() bool

Jump to

Keyboard shortcuts

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