code: func (m *GormAreaRepository) Create(ctx context.Context, u *Area) error {
  	defer goa.MeasureSince([]string{"goa", "db", "area", "create"}, time.Now())
  
  	u.HumanFriendlyNumber = numbersequence.NewHumanFriendlyNumber(u.SpaceID, u.TableName())
  
  	if u.ID == uuid.Nil {
  		u.ID = uuid.NewV4()
  		u.Path = path.Path{u.ID}
  	}
  	if u.Path == nil || len(u.Path) == 0 {
  		u.Path = path.Path{u.ID}
  	} else {
  		if u.Path.This() != u.ID {
  			return errs.Errorf("area path has to end with area ID %s", u.ID)
  		}
  	}
  
  	err := m.db.Create(u).Error
  	if err != nil {
  		// ( name, spaceID ,path ) needs to be unique
  		if gormsupport.IsUniqueViolation(err, "areas_name_space_id_path_unique") {
  			log.Error(ctx, map[string]interface{}{
  				"err":      err,
  				"name":     u.Name,
  				"path":     u.Path,
  				"space_id": u.SpaceID,
  			}, "unable to create child area because an area in the same path already exists")
  			return errors.NewDataConflictError(fmt.Sprintf("area already exists with name = %s , space_id = %s , path = %s ", u.Name, u.SpaceID.String(), u.Path.ParentPath().String()))
  		}
  		log.Error(ctx, map[string]interface{}{}, "error adding Area: %s", err.Error())
  		return err
  	}
  	return nil
  }
docs: // Create creates a new record.