func (m *GormUserRepository) Create(ctx context.Context, u *User) error {
	defer goa.MeasureSince([]string{"goa", "db", "user", "create"}, time.Now())
	if u.ID == uuid.Nil {
		u.ID = uuid.NewV4()
	}
	err := m.db.Create(u).Error
	if err != nil {
		log.Error(ctx, map[string]interface{}{
			"user_id": u.ID,
			"err":     err,
		}, "unable to create the user")
		return errors.WithStack(err)
	}
	log.Debug(ctx, map[string]interface{}{
		"user_id": u.ID,
	}, "User created!")
	return nil
}
// Create creates a new record.
Create creates a new record.
// Create creates a new record .
func (m *GormUserRepository) Create(ctx context.Context, u *User) error {
	defer goa.MeasureSince([]string{"goa", "db", "user", "create"}, time.Now())
	if u.ID == uuid.Nil {
		u.ID = uuid.NewV4()
	}
	err := m.db.Create(u).Error
	if err != nil {
		log.Error(ctx, map[string]interface{}{
			"user_id": u.ID,
			"err":     err,
		}, "unable to create the user")
		return errors.WithStack(err)
	}
	log.Debug(ctx, map[string]interface{}{
		"user_id": u.ID,
	}, "User created!")
	return nil
}
func ( m * GormUserRepository ) Create ( ctx context . Context , u * User ) error { defer goa . MeasureSince ( [ ] string { " " , " " , " " , " " } , time . Now ( ) ) if u . ID == uuid . Nil { u . ID = uuid . NewV4 ( ) } err := m . db . Create ( u ) . Error if err != nil { log . Error ( ctx , map [ string ] interface { } { " " : u . ID , " " : err , } , " " ) return errors . WithStack ( err ) } log . Debug ( ctx , map [ string ] interface { } { " " : u . ID , } , " " ) return nil }
Create creates a new record.
Create creates a new record .