entc: change the way we inject additional fields (#1560)

Summary:
Pull Request resolved: https://github.com/facebookexternal/fbc/pull/1560

Pull Request resolved: https://github.com/facebookincubator/ent/pull/96

Reviewed By: alexsn

Differential Revision: D17931147

fbshipit-source-id: 24e1d72be482cb787c557f46feeb2ed4a31dfe60
This commit is contained in:
Ariel Mashraki
2019-10-15 11:59:27 -07:00
committed by Facebook Github Bot
parent aa23f95b3e
commit c5b790043c
14 changed files with 50 additions and 150 deletions

View File

@@ -5,9 +5,6 @@
package valid
import (
"log"
"sync"
"github.com/facebookincubator/ent"
"github.com/facebookincubator/ent/schema/field"
)
@@ -15,13 +12,6 @@ import (
// User holds the user schema.
type User struct {
ent.Schema
// add additional struct-only
// fields to the generated model.
Tenant string `json:"tenant,omitempty"`
Logger *log.Logger // Comment.
sync.Mutex
Ignored ent.Interface // Ignored comment.
}
func (User) Fields() []ent.Field {