27 lines
1.2 KiB
Go
27 lines
1.2 KiB
Go
|
|
package repository
|
||
|
|
|
||
|
|
import (
|
||
|
|
"context"
|
||
|
|
"time"
|
||
|
|
|
||
|
|
"apskel-pos-be/internal/entities"
|
||
|
|
|
||
|
|
"github.com/google/uuid"
|
||
|
|
)
|
||
|
|
|
||
|
|
// TableRepositoryInterface defines the interface for table repository operations
|
||
|
|
type TableRepositoryInterface interface {
|
||
|
|
Create(ctx context.Context, table *entities.Table) error
|
||
|
|
GetByID(ctx context.Context, id uuid.UUID) (*entities.Table, error)
|
||
|
|
GetByOutletID(ctx context.Context, outletID uuid.UUID) ([]entities.Table, error)
|
||
|
|
GetByOrganizationID(ctx context.Context, organizationID uuid.UUID) ([]entities.Table, error)
|
||
|
|
Update(ctx context.Context, table *entities.Table) error
|
||
|
|
Delete(ctx context.Context, id uuid.UUID) error
|
||
|
|
List(ctx context.Context, organizationID, outletID *uuid.UUID, status *string, isActive *bool, search string, page, limit int) ([]entities.Table, int64, error)
|
||
|
|
GetAvailableTables(ctx context.Context, outletID uuid.UUID) ([]entities.Table, error)
|
||
|
|
GetOccupiedTables(ctx context.Context, outletID uuid.UUID) ([]entities.Table, error)
|
||
|
|
OccupyTable(ctx context.Context, tableID, orderID uuid.UUID, startTime *time.Time) error
|
||
|
|
ReleaseTable(ctx context.Context, tableID uuid.UUID, paymentAmount float64) error
|
||
|
|
GetByOrderID(ctx context.Context, orderID uuid.UUID) (*entities.Table, error)
|
||
|
|
}
|