// ID generates the id field with a given prefix
ID generates the id field with a given prefix
// ID generates the id field with a given prefix
func ID(prefix string) ent.Field {
	return field.
		String("id").
		MaxLen(255).
		Immutable().
		DefaultFunc(func() string {
			return fmt.Sprintf("%s_%s", prefix, uniuri.NewLen(uniuri.UUIDLen))
		})
}
func ID ( prefix string ) ent . Field { return field . String ( " " ) . MaxLen ( 255 ) . Immutable ( ) . DefaultFunc ( func ( ) string { return fmt . Sprintf ( " " , prefix , uniuri . NewLen ( uniuri . UUIDLen ) ) } ) }
ID generates the id field with a given prefix
ID generates the id field with a given prefix