package flight

import "context"

type FlightRepository interface {
	Create(ctx context.Context, row *Flight) error
	GetLatestMissionCodeByPrefix(ctx context.Context, prefix string) (string, error)
	Update(ctx context.Context, row *Flight) error
	Delete(ctx context.Context, id []byte, deletedBy []byte) error
	GetByID(ctx context.Context, id []byte) (*Flight, error)
	ListByUserID(ctx context.Context, userID []byte, limit, offset int) ([]Flight, int64, error)
	ListByCreatedBy(ctx context.Context, createdBy []byte, filter string, date string, sort string, limit, offset int) ([]Flight, int64, error)
	GetByReserveAcID(ctx context.Context, reserveAcID []byte) (*Flight, error)
	ListByReserveAcID(ctx context.Context, reserveAcID []byte) ([]Flight, error)
	GetByTakeoverAcID(ctx context.Context, takeoverAcID []byte) (*Flight, error)
	ListByTakeoverAcIDs(ctx context.Context, takeoverAcIDs [][]byte) ([]Flight, error)
	GetByDutyRosterID(ctx context.Context, dutyRosterID []byte) (*Flight, error)
	ListByDutyRosterIDs(ctx context.Context, dutyRosterIDs [][]byte) ([]Flight, error)
	List(ctx context.Context, filter string, date string, sort string, limit, offset int) ([]Flight, int64, error)
}
