package mission import "context" type Repository interface { WithTransaction(ctx context.Context, fn func(ctx context.Context) error) error Create(ctx context.Context, row *Mission) error CreateCategory(ctx context.Context, row *MissionCategory) error UpdateFlightDataIDByID(ctx context.Context, missionID, flightDataID, updatedBy []byte) error UpdateByID(ctx context.Context, missionID []byte, missionType string, missionCategoryID []byte, subtypeID []byte, note string, updatedBy []byte) error DeleteByID(ctx context.Context, missionID []byte, deletedBy []byte) error DeleteByFlightID(ctx context.Context, flightID []byte, deletedBy []byte) error ListByFlightID(ctx context.Context, flightID []byte) ([]Mission, error) ListByFlightIDs(ctx context.Context, flightIDs [][]byte) ([]Mission, error) GetByID(ctx context.Context, missionID []byte) (*Mission, error) GetByFlightID(ctx context.Context, flightID []byte) (*Mission, error) List(ctx context.Context, filter, sort string, flightID []byte, flightDataStatus string, limit, offset int) ([]Mission, int64, error) ListDatatable(ctx context.Context, filter ListFilter, limit, offset int) ([]Mission, int64, int64, error) ListCategoriesWithSubCategories(ctx context.Context) ([]MissionCategory, error) FindCategoryByCode(ctx context.Context, code string) (*MissionCategory, error) SubCategoryBelongsToCategory(ctx context.Context, subCategoryID, categoryID []byte) (bool, error) MaxCodeSeqByPrefix(ctx context.Context, prefix string) (int, error) AttachFile(ctx context.Context, missionID []byte, fileAttachmentID []byte) error DetachFile(ctx context.Context, missionID []byte, fileAttachmentID []byte) error }