func (r *GormWorkItemLinkRevisionRepository) Create(ctx context.Context, modifierID uuid.UUID, revisionType RevisionType, l WorkItemLink) error {
	log.Info(nil, map[string]interface{}{
		"modifier_id":   modifierID,
		"revision_type": revisionType,
	}, "Storing a revision after operation on work item link.")
	tx := r.db
	revision := &Revision{
		ModifierIdentity:     modifierID,
		Time:                 time.Now(),
		Type:                 revisionType,
		WorkItemLinkID:       l.ID,
		WorkItemLinkVersion:  l.Version,
		WorkItemLinkSourceID: l.SourceID,
		WorkItemLinkTargetID: l.TargetID,
		WorkItemLinkTypeID:   l.LinkTypeID,
	}
	if err := tx.Create(&revision).Error; err != nil {
		return errors.NewInternalError(fmt.Sprintf("failed to create new work item link revision: %s", err.Error()))
	}
	log.Debug(ctx, map[string]interface{}{"wil_id": l.ID}, "work item link revision occurrence created")
	return nil
}
// Create stores a new revision for the given work item link.
Create stores a new revision for the given work item link.
// Create stores a new revision for the given work item link .
func (r *GormWorkItemLinkRevisionRepository) Create(ctx context.Context, modifierID uuid.UUID, revisionType RevisionType, l WorkItemLink) error {
	log.Info(nil, map[string]interface{}{
		"modifier_id":   modifierID,
		"revision_type": revisionType,
	}, "Storing a revision after operation on work item link.")
	tx := r.db
	revision := &Revision{
		ModifierIdentity:     modifierID,
		Time:                 time.Now(),
		Type:                 revisionType,
		WorkItemLinkID:       l.ID,
		WorkItemLinkVersion:  l.Version,
		WorkItemLinkSourceID: l.SourceID,
		WorkItemLinkTargetID: l.TargetID,
		WorkItemLinkTypeID:   l.LinkTypeID,
	}
	if err := tx.Create(&revision).Error; err != nil {
		return errors.NewInternalError(fmt.Sprintf("failed to create new work item link revision: %s", err.Error()))
	}
	log.Debug(ctx, map[string]interface{}{"wil_id": l.ID}, "work item link revision occurrence created")
	return nil
}
func ( r * GormWorkItemLinkRevisionRepository ) Create ( ctx context . Context , modifierID uuid . UUID , revisionType RevisionType , l WorkItemLink ) error { log . Info ( nil , map [ string ] interface { } { " " : modifierID , " " : revisionType , } , " " ) tx := r . db revision := & Revision { ModifierIdentity : modifierID , Time : time . Now ( ) , Type : revisionType , WorkItemLinkID : l . ID , WorkItemLinkVersion : l . Version , WorkItemLinkSourceID : l . SourceID , WorkItemLinkTargetID : l . TargetID , WorkItemLinkTypeID : l . LinkTypeID , } if err := tx . Create ( & revision ) . Error ; err != nil { return errors . NewInternalError ( fmt . Sprintf ( " " , err . Error ( ) ) ) } log . Debug ( ctx , map [ string ] interface { } { " " : l . ID } , " " ) return nil }
Create stores a new revision for the given work item link.
Create stores a new revision for the given work item link .