bill-server-go/internal/bill/repository.go

57 lines
1.3 KiB
Go
Raw Normal View History

2023-05-08 21:48:34 +08:00
package bill
import (
"context"
2023-06-01 17:55:41 +08:00
"gorm.io/gorm"
2023-05-08 21:48:34 +08:00
)
2023-06-01 17:55:41 +08:00
type databaseRepository struct {
db *gorm.DB
2023-05-08 21:48:34 +08:00
}
2023-06-01 17:55:41 +08:00
func NewDatabaseRepository(db *gorm.DB) BillRepository {
return &databaseRepository{
db: db,
2023-05-08 21:48:34 +08:00
}
}
2023-06-01 17:55:41 +08:00
func (db *databaseRepository) GetBills(ctx context.Context) (*[]Bill, error) {
2023-05-08 21:48:34 +08:00
//TODO implement me
panic("implement me")
}
2023-06-01 17:55:41 +08:00
func (db *databaseRepository) GetBillByDay(ctx context.Context, year int, month int, day int) (*[]Bill, error) {
2023-05-08 21:48:34 +08:00
//TODO implement me
panic("implement me")
}
2023-06-01 17:55:41 +08:00
func (db *databaseRepository) GetBillByMonth(ctx context.Context, year int, month int) (*[]Bill, error) {
2023-05-08 21:48:34 +08:00
//TODO implement me
panic("implement me")
}
2023-06-01 17:55:41 +08:00
func (db *databaseRepository) GetBillByYear(ctx context.Context, year int) (*[]Bill, error) {
2023-05-08 21:48:34 +08:00
//TODO implement me
panic("implement me")
}
2023-06-01 17:55:41 +08:00
func (db *databaseRepository) GetBillByID(ctx context.Context, id int) (*Bill, error) {
2023-05-08 21:48:34 +08:00
//TODO implement me
panic("implement me")
}
2023-06-01 17:55:41 +08:00
func (db *databaseRepository) CreateBill(ctx context.Context, bill *Bill) error {
2023-05-08 21:48:34 +08:00
//TODO implement me
panic("implement me")
}
2023-06-01 17:55:41 +08:00
func (db *databaseRepository) UpdateBill(ctx context.Context, bill *Bill) error {
2023-05-08 21:48:34 +08:00
//TODO implement me
panic("implement me")
}
2023-06-01 17:55:41 +08:00
func (db *databaseRepository) DeleteBill(ctx context.Context, id int) error {
2023-05-08 21:48:34 +08:00
//TODO implement me
panic("implement me")
}