Skip to content

246859/schematype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

schematype

schema type helper for ent fields

install

go get -u github.com/246859/schematype

example

func (User) Fields() []ent.Field {
    return []ent.Field{
		// mysql varchar
        field.String("name").SchemaType(schematype.MySQL().VarChar(255)),
        field.Int("age").SchemaType(schematype.MySQL().TinyInt(0)),
    }
}

About

schema type helper for ent fields

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages