init push

This commit is contained in:
2026-07-16 22:16:45 +07:00
commit 8b068bdb10
1021 changed files with 332816 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
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
}