package repositories import ( "gorm.io/gorm" "sorbet/internal/entities" "sorbet/pkg/db" ) type ResourceRepository struct { *db.Repository[entities.Resource] } // NewResourceRepository 创建资源仓库 func NewResourceRepository(orm *gorm.DB) *ResourceRepository { return &ResourceRepository{ db.NewRepositoryWith[entities.Resource](orm, "id"), } }