update license

This commit is contained in:
aditya.siregar
2024-07-30 00:55:20 +07:00
parent 5b286fd44c
commit 2d1c450f65
7 changed files with 44 additions and 10 deletions
+2 -2
View File
@@ -49,8 +49,8 @@ func (r *LicenseRepository) FindByID(ctx context.Context, id string) (*entity.Li
return license, nil
}
func (r *LicenseRepository) GetAll(ctx context.Context, limit, offset int, statusFilter string) ([]*entity.License, int64, error) {
var licenses []*entity.License
func (r *LicenseRepository) GetAll(ctx context.Context, limit, offset int, statusFilter string) ([]*entity.LicenseGetAll, int64, error) {
var licenses []*entity.LicenseGetAll
var total int64
// Define the main query with status calculation
+1 -1
View File
@@ -196,5 +196,5 @@ type License interface {
Create(ctx context.Context, license *entity.LicenseDB) (*entity.LicenseDB, error)
Update(ctx context.Context, license *entity.LicenseDB) (*entity.LicenseDB, error)
FindByID(ctx context.Context, id string) (*entity.LicenseDB, error)
GetAll(ctx context.Context, limit, offset int, statusFilter string) ([]*entity.License, int64, error)
GetAll(ctx context.Context, limit, offset int, statusFilter string) ([]*entity.LicenseGetAll, int64, error)
}