refactor: rename data repository

This commit is contained in:
Liangzhao Che 2023-06-01 18:01:10 +08:00
parent 5ea6779d75
commit 94b2cf29a2
2 changed files with 10 additions and 10 deletions

View File

@ -5,52 +5,52 @@ import (
"gorm.io/gorm"
)
type databaseRepository struct {
type sqliteRepository struct {
db *gorm.DB
}
func NewDatabaseRepository(db *gorm.DB) BillRepository {
return &databaseRepository{
return &sqliteRepository{
db: db,
}
}
func (db *databaseRepository) GetBills(ctx context.Context) (*[]Bill, error) {
func (db *sqliteRepository) GetBills(ctx context.Context) (*[]Bill, error) {
//TODO 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
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
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
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
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
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
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
panic("implement me")
}