refactor: rename data repository
This commit is contained in:
parent
5ea6779d75
commit
94b2cf29a2
|
@ -5,52 +5,52 @@ import (
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
)
|
)
|
||||||
|
|
||||||
type databaseRepository struct {
|
type sqliteRepository struct {
|
||||||
db *gorm.DB
|
db *gorm.DB
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewDatabaseRepository(db *gorm.DB) BillRepository {
|
func NewDatabaseRepository(db *gorm.DB) BillRepository {
|
||||||
return &databaseRepository{
|
return &sqliteRepository{
|
||||||
db: db,
|
db: db,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *databaseRepository) GetBills(ctx context.Context) (*[]Bill, error) {
|
func (db *sqliteRepository) GetBills(ctx context.Context) (*[]Bill, error) {
|
||||||
//TODO implement me
|
//TODO implement me
|
||||||
panic("implement me")
|
panic("implement me")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *databaseRepository) GetBillByDay(ctx context.Context, year int, month int, day int) (*[]Bill, error) {
|
func (db *sqliteRepository) GetBillByDay(ctx context.Context, year int, month int, day int) (*[]Bill, error) {
|
||||||
//TODO implement me
|
//TODO implement me
|
||||||
panic("implement me")
|
panic("implement me")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *databaseRepository) GetBillByMonth(ctx context.Context, year int, month int) (*[]Bill, error) {
|
func (db *sqliteRepository) GetBillByMonth(ctx context.Context, year int, month int) (*[]Bill, error) {
|
||||||
//TODO implement me
|
//TODO implement me
|
||||||
panic("implement me")
|
panic("implement me")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *databaseRepository) GetBillByYear(ctx context.Context, year int) (*[]Bill, error) {
|
func (db *sqliteRepository) GetBillByYear(ctx context.Context, year int) (*[]Bill, error) {
|
||||||
//TODO implement me
|
//TODO implement me
|
||||||
panic("implement me")
|
panic("implement me")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *databaseRepository) GetBillByID(ctx context.Context, id int) (*Bill, error) {
|
func (db *sqliteRepository) GetBillByID(ctx context.Context, id int) (*Bill, error) {
|
||||||
//TODO implement me
|
//TODO implement me
|
||||||
panic("implement me")
|
panic("implement me")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *databaseRepository) CreateBill(ctx context.Context, bill *Bill) error {
|
func (db *sqliteRepository) CreateBill(ctx context.Context, bill *Bill) error {
|
||||||
//TODO implement me
|
//TODO implement me
|
||||||
panic("implement me")
|
panic("implement me")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *databaseRepository) UpdateBill(ctx context.Context, bill *Bill) error {
|
func (db *sqliteRepository) UpdateBill(ctx context.Context, bill *Bill) error {
|
||||||
//TODO implement me
|
//TODO implement me
|
||||||
panic("implement me")
|
panic("implement me")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (db *databaseRepository) DeleteBill(ctx context.Context, id int) error {
|
func (db *sqliteRepository) DeleteBill(ctx context.Context, id int) error {
|
||||||
//TODO implement me
|
//TODO implement me
|
||||||
panic("implement me")
|
panic("implement me")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user