persistence

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package persistence. Code is generated. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIncomeRepository

func NewIncomeRepository() domain.IncomeRepository

Types

type IncomeEntity

type IncomeEntity struct {
	Id            db_gorm.ID `gorm:"primaryKey"`
	Detail        string     `gorm:"detail;type:VARCHAR(64) NOT NULL"`
	Amount        int64      `gorm:"type:bigint NOT NULL DEFAULT 0"`
	SubjectId     db_gorm.ID `gorm:"not null" mapper:"Subject,subject2Id,id2Subject"`
	AccountId     db_gorm.ID `gorm:"not null"`
	OperatorId    db_gorm.ID `gorm:"not null"`
	TransactionAt time.Time  `gorm:"not null"`
	CreateAt      time.Time  `gorm:"autoCreateTime;not null"`
}

func (*IncomeEntity) TableName

func (entity *IncomeEntity) TableName() string

type IncomeRepository

type IncomeRepository struct {
}

func (*IncomeRepository) CountByAccountId

func (repository *IncomeRepository) CountByAccountId(ctx trx.Context, accountId int64) (int64, error)

func (*IncomeRepository) DeleteByAccountId

func (repository *IncomeRepository) DeleteByAccountId(ctx trx.Context, accountId int64) (int64, error)

func (*IncomeRepository) DeleteById

func (repository *IncomeRepository) DeleteById(ctx trx.Context, id int64) (bool, error)

func (*IncomeRepository) FindByAccountIdAndTransactionAtBetween

func (repository *IncomeRepository) FindByAccountIdAndTransactionAtBetween(ctx trx.Context, accountId int64, start time.Time, end time.Time) ([]*domain.Income, error)

func (*IncomeRepository) FindByAccountIdOrderByAccountIdAndTransactionAtDesc

func (repository *IncomeRepository) FindByAccountIdOrderByAccountIdAndTransactionAtDesc(ctx trx.Context, accountId int64) ([]*domain.Income, error)

func (*IncomeRepository) FindById

func (repository *IncomeRepository) FindById(ctx trx.Context, id int64) (*domain.Income, error)

func (*IncomeRepository) Insert

func (repository *IncomeRepository) Insert(ctx trx.Context, income *domain.Income) (*domain.Income, error)

func (*IncomeRepository) InsertAll

func (repository *IncomeRepository) InsertAll(ctx trx.Context, incomes []*domain.Income) ([]*domain.Income, error)

func (*IncomeRepository) Test

func (repo *IncomeRepository) Test(ctx trx.Context) int64

func (*IncomeRepository) UpdateAccountIdAndDetailByTransactionAt

func (repository *IncomeRepository) UpdateAccountIdAndDetailByTransactionAt(ctx trx.Context, accountId int64, detail string, transactionAt time.Time) (int64, error)

func (*IncomeRepository) UpdateById

func (repository *IncomeRepository) UpdateById(ctx trx.Context, income *domain.Income, id int64) (bool, error)

Jump to

Keyboard shortcuts

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