Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
type Entry struct { UUID uuid.UUID `gorm:"type:uuid;primaryKey" json:"uuid" binding:"-"` CreatedAt time.Time `json:"createdAt" binding:"-"` UpdatedAt time.Time `json:"updatedAt" binding:"-"` DeletedAt gorm.DeletedAt `json:"-" binding:"-"` 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
func (*Entry) BeforeCreate ¶
BeforeCreate execute commands before creating a Entry
type EntryTag ¶
type EntryTag struct { UUID uuid.UUID `gorm:"type:uuid;primaryKey" json:"uuid" binding:"-"` CreatedAt time.Time `json:"createdAt" binding:"-"` UpdatedAt time.Time `json:"updatedAt" binding:"-"` DeletedAt *time.Time `json:"-" binding:"-"` Entry uuid.UUID `gorm:"index:entry_tag_entry;not null" json:"entry" ` Tag uuid.UUID `gorm:"index:entry_tag_tag;not null" json:"tag" ` }
EntryTag is a association between Entry and Tag entities
func (*EntryTag) BeforeCreate ¶
BeforeCreate execute command before creating a EntryTag
type Repository ¶
type Repository interface { Delete(ctx context.Context, pk uuid.UUID, owner uuid.UUID) error Get(ctx context.Context, pk uuid.UUID, owner uuid.UUID) (*Entry, error) Save(ctx context.Context, row *Entry) error Query(ctx context.Context, filters *rest.Query) ([]Entry, error) }
Repository interface defines methods to manipute user entries
Click to show internal directories.
Click to hide internal directories.