Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrDuplicated = errors.New("duplicated")
)
Functions ¶
This section is empty.
Types ¶
type PriceRepository ¶
type PriceRepository interface { Create(ctx context.Context, userId uint, dateTime time.Time, store, product string, price uint, inStock bool) (*entity.Price, error) Find(ctx context.Context, id, userId uint) (*entity.Price, error) FindByUserId(ctx context.Context, userId uint) ([]entity.Price, error) Update(ctx context.Context, id, userId uint, dateTime time.Time, store, product string, price uint, inStock bool) (*entity.Price, int64, error) Delete(ctx context.Context, id, userId uint) (int64, error) }
価格テーブル操作
func NewPriceRepository ¶
func NewPriceRepository(db *gorm.DB) PriceRepository
type Repository ¶
type Repository interface { InitDb(ctx context.Context) error BeginTx(ctx context.Context) (context.Context, error) Rollback(ctx context.Context) error Commit(ctx context.Context) error User() UserRepository Price() PriceRepository }
func NewRepository ¶
func NewRepository(sqlDB *sql.DB) (Repository, error)
Click to show internal directories.
Click to hide internal directories.