Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { BaseModel Name string `json:"name" binding:"required"` Description string `json:"description" ` Owner uuid.UUID `gorm:"INDEX,not null" json:"owner" ` }
Account to iterate with database
type BaseModel ¶
type BaseModel struct { UUID uuid.UUID `gorm:"type:uuid;PRIMARY_KEY" json:"uuid"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` DeletedAt *time.Time `json:"deletedAt"` }
BaseModel is the base struct for tables
func (BaseModel) BeforeCreate ¶
BeforeCreate execute commands before creating a BaseModel
type Category ¶
type Category struct { BaseModel Name string `json:"name" binding:"required"` Description string `json:"description" ` Parent uuid.UUID `json:"parent" gorm:"INDEX"` Owner uuid.UUID `gorm:"INDEX,not null" json:"owner" ` }
Category to iterate with database
type Entry ¶
type Entry struct { BaseModel Date time.Time `json:"date" binding:"required"` Type bool `json:"type" binding:"required"` Pending bool `json:"pending"` Name string `json:"name" binding:"required"` Value float64 `json:"value" binding:"required"` Description string `json:"description" ` IsTransfer bool `json:"isTransfer"` Origin uuid.UUID `json:"origin"` Category uuid.UUID `json:"category" binding:"required" gorm:"INDEX,not null"` Account uuid.UUID `json:"account" binding:"required" gorm:"INDEX,not null"` Owner uuid.UUID `gorm:"INDEX,not null" json:"owner" ` }
Entry to iterate with database
type EntryTag ¶
type EntryTag struct { BaseModel Entry uuid.UUID `gorm:"INDEX,not null" json:"entry" ` Tag uuid.UUID `gorm:"INDEX,not null" json:"tag" ` }
EntryTag is a association between Entry and Tag entities
type Tag ¶
type Tag struct { BaseModel Name string `json:"name" binding:"required"` Description string `json:"description" ` Owner uuid.UUID `gorm:"INDEX,not null" json:"owner" ` }
Tag to iterate with database
type User ¶
type User struct { BaseModel FirstName string `json:"firstName" binding:"required"` LastName string `json:"lastName"` Email string `json:"email" gorm:"UNIQUE" binding:"required"` Username string `json:"username" gorm:"UNIQUE" binding:"required"` Password string `json:"password" ` Active bool `json:"active" ` }
User domain/database representation
Source Files ¶
Click to show internal directories.
Click to hide internal directories.