Introduce lms_personas table, repoint practice persona_id FKs off users, validate persona refs on LMS and exam-prep practice flows, personas.* RBAC permissions, and OpenAPI docs. Co-authored-by: Cursor <cursoragent@cursor.com>
22 lines
752 B
Go
22 lines
752 B
Go
package ports
|
|
|
|
import (
|
|
"context"
|
|
|
|
"Yimaru-Backend/internal/domain"
|
|
)
|
|
|
|
// LmsPersonaReader resolves catalog personas referenced by LMS / exam-prep practices.
|
|
type LmsPersonaReader interface {
|
|
GetLmsPersonaByID(ctx context.Context, id int64) (domain.LmsPersona, error)
|
|
}
|
|
|
|
// LmsPersonaStore is full CRUD for lms_personas.
|
|
type LmsPersonaStore interface {
|
|
LmsPersonaReader
|
|
CreateLmsPersona(ctx context.Context, in domain.CreateLmsPersonaInput) (domain.LmsPersona, error)
|
|
UpdateLmsPersona(ctx context.Context, id int64, in domain.UpdateLmsPersonaInput) (domain.LmsPersona, error)
|
|
DeleteLmsPersona(ctx context.Context, id int64) error
|
|
ListLmsPersonas(ctx context.Context, activeOnly bool, limit, offset int32) ([]domain.LmsPersona, int64, error)
|
|
}
|