mirror of
https://github.com/ent/ent.git
synced 2026-05-24 09:31:56 +03:00
entc/gen: define method receiver on enum fields (#580)
Signed-off-by: Alex Snast <alexsn@fb.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user