feat(09-10): add typed relation manager

This commit is contained in:
Jakub Zych
2026-09-26 21:33:43 +02:00
parent d7d48e2fbe
commit 12081c18d1
7 changed files with 1176 additions and 12 deletions

View File

@@ -192,6 +192,13 @@ type ListExtendQuery interface {
ListExtendQuery(ctx context.Context, db *gorm.DB) *gorm.DB
}
// ListRelationColumnMapper maps a source-schema relation column onto the
// physical column exposed by the related Go model. It supports legacy admin
// schemas whose public field names no longer match the database schema.
type ListRelationColumnMapper interface {
ListRelationColumn(relation, column string) (string, bool)
}
// FormExtendQuery optionally narrows admin form record lookup.
type FormExtendQuery interface {
FormExtendQuery(ctx context.Context, db *gorm.DB) *gorm.DB