mirror of
https://github.com/go-admin-team/go-admin.git
synced 2026-09-29 12:31:11 +00:00
The five /sysjob routes use the generic actions. The detail route uses ViewAs to keep answering SysJobItem, whose entryId the edit form reads where the model marshals entry_id. GenerateM becomes ToModel, and the Generate methods go. Recorded before the change and replayed after it, the same 14 requests get byte-identical responses; answering the detail with the model instead of SysJobItem makes exactly the two detail requests differ. With a real ToModel on both modules, a test now builds a package that pairs the demo model with the jobs request and requires the build to fail on that pairing, next to the same package with the pair corrected.
12 lines
323 B
Go
12 lines
323 B
Go
// Package matched is mismatch with the pair corrected: the control that
|
|
// shows mismatch fails for the pairing, not for how it is built.
|
|
package matched
|
|
|
|
import (
|
|
"go-admin/app/demo/models"
|
|
"go-admin/app/demo/service/dto"
|
|
"go-admin/common/actions"
|
|
)
|
|
|
|
var _ = actions.Create[models.DemoProduct, dto.DemoProductControl]
|