entc/gen: define method receiver on enum fields (#580)

Signed-off-by: Alex Snast <alexsn@fb.com>
This commit is contained in:
Alex Snast
2020-07-03 20:41:32 +03:00
committed by GitHub
parent 902b29d9bf
commit da56f8e6e8
5 changed files with 15 additions and 15 deletions

View File

@@ -167,8 +167,8 @@ const (
RoleAdmin Role = "admin"
)
func (s Role) String() string {
return string(s)
func (r Role) String() string {
return string(r)
}
// RoleValidator is a validator for the "r" field enum values. It is called by the builders before save.

View File

@@ -100,8 +100,8 @@ const (
RoleAdmin Role = "admin"
)
func (s Role) String() string {
return string(s)
func (r Role) String() string {
return string(r)
}
// RoleValidator is a validator for the "r" field enum values. It is called by the builders before save.

View File

@@ -67,8 +67,8 @@ const (
TypeIrregular Type = "irregular"
)
func (s Type) String() string {
return string(s)
func (_type Type) String() string {
return string(_type)
}
// TypeValidator is a validator for the "_type" field enum values. It is called by the builders before save.