models

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

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

Go to latest
Published: Sep 11, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	ID        primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	UserID    primitive.ObjectID `json:"userId,omitempty" bson:"_userId,omitempty"`
	ProjectID primitive.ObjectID `json:"projectId,omitempty" bson:"projectId,omitempty"`
	Name      string             `json:"name" bson:"name,omitempty"`
}

type CategorySummary

type CategorySummary struct {
	ID           primitive.ObjectID `json:"categoryId,omitempty" bson:"_id,omitempty"`
	CategoryName string             `json:"categoryName,omitempty"`
	Sum          float64            `json:"sum,omitempty"`
}

type Expense

type Expense struct {
	ID         primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	UserID     primitive.ObjectID `json:"userId,omitempty" bson:"_userId,omitempty"`
	ProjectID  primitive.ObjectID `json:"projectId,omitempty" bson:"projectId,omitempty"`
	CategoryID primitive.ObjectID `json:"categoryId,omitempty" bson:"_categoryId,omitempty"`
	Title      string             `json:"title,omitempty" bson:"title,omitempty"`
	Amount     float64            `json:"amount,omitempty" bson:"amount,omitempty"`
	AddedDate  time.Time          `json:"addedDate,omitempty" bson:"addedDate,omitempty"`
	Category   Category           `json:"category,omitempty" bson:"-"`
}

Expense model

type Project

type Project struct {
	ID            primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	OwnerId       primitive.ObjectID `json:"ownerId,omitempty" bson:"_ownerId,omitempty"`
	Name          string             `json:"name,omitempty" bson:"name,omitempty"`
	AddedDate     time.Time          `json:"addedDate,omitempty" bson:"addedDate,omitempty"`
	DisabledDate  time.Time          `json:"disabledDate,omitempty" bson:"disabledDate"`
	Disabled      bool               `json:"disabled" bson:"disabled"`
	AssignedUsers []UserDto          `json:"assignedUsers" bson:"assignedUsers"`
}

type ProjectUser

type ProjectUser struct {
	UserId    primitive.ObjectID `json:"userId" bson:"userId"`
	ProjectId primitive.ObjectID `json:"projectId" bson:"projectId"`
}

type User

type User struct {
	ID          primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Username    string             `json:"username" bson:"username"`
	CreatedDate time.Time          `json:"createdDate" bson:"createdDate"`
	Email       string             `json:"email" bson:"email"`
	Password    string             `json:"password" bson:"password"`
}

type UserDto

type UserDto struct {
	ID       primitive.ObjectID `json:"_id,omitempty" bson:"_id,omitempty"`
	Username string             `json:"username" bson:"username"`
	Email    string             `json:"email" bson:"email"`
}

Jump to

Keyboard shortcuts

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