mirror of
				https://github.com/zitadel/zitadel.git
				synced 2025-10-31 23:09:42 +00:00 
			
		
		
		
	 bdf3887f9e
			
		
	
	bdf3887f9e
	
	
	
		
			
			* feat: default custom message text * feat: org custom message text * feat: org custom message text * feat: custom messages query side * feat: default messages * feat: message text user fields * feat: check for inactive user * feat: fix send password reset * feat: fix custom org text * feat: add variables to docs * feat: custom text tests * feat: fix notifications * feat: add custom text feature * feat: add custom text feature * feat: feature in custom message texts * feat: add custom text feature in frontend * feat: merge main * feat: feature tests * feat: change phone message in setup * fix: remove unused code, add event translation * fix: merge main and fix problems * fix: english translation file * fix: migration versions * fix: setup * feat: fix pr requests * feat: fix phone code message * feat: migration * feat: setup * fix: remove unused tests Co-authored-by: Livio Amstutz <livio.a@gmail.com>
		
			
				
	
	
		
			64 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			64 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
| package model
 | |
| 
 | |
| import (
 | |
| 	"github.com/caos/zitadel/internal/domain"
 | |
| 	iam_model "github.com/caos/zitadel/internal/iam/model"
 | |
| 	"github.com/caos/zitadel/internal/view/repository"
 | |
| )
 | |
| 
 | |
| type MessageTextSearchRequest iam_model.MessageTextSearchRequest
 | |
| type MessageTextSearchQuery iam_model.MessageTextSearchQuery
 | |
| type MessageTextSearchKey iam_model.MessageTextSearchKey
 | |
| 
 | |
| func (req MessageTextSearchRequest) GetLimit() uint64 {
 | |
| 	return req.Limit
 | |
| }
 | |
| 
 | |
| func (req MessageTextSearchRequest) GetOffset() uint64 {
 | |
| 	return req.Offset
 | |
| }
 | |
| 
 | |
| func (req MessageTextSearchRequest) GetSortingColumn() repository.ColumnKey {
 | |
| 	if req.SortingColumn == iam_model.MessageTextSearchKeyUnspecified {
 | |
| 		return nil
 | |
| 	}
 | |
| 	return MessageTextSearchKey(req.SortingColumn)
 | |
| }
 | |
| 
 | |
| func (req MessageTextSearchRequest) GetAsc() bool {
 | |
| 	return req.Asc
 | |
| }
 | |
| 
 | |
| func (req MessageTextSearchRequest) GetQueries() []repository.SearchQuery {
 | |
| 	result := make([]repository.SearchQuery, len(req.Queries))
 | |
| 	for i, q := range req.Queries {
 | |
| 		result[i] = MessageTextSearchQuery{Key: q.Key, Value: q.Value, Method: q.Method}
 | |
| 	}
 | |
| 	return result
 | |
| }
 | |
| 
 | |
| func (req MessageTextSearchQuery) GetKey() repository.ColumnKey {
 | |
| 	return MessageTextSearchKey(req.Key)
 | |
| }
 | |
| 
 | |
| func (req MessageTextSearchQuery) GetMethod() domain.SearchMethod {
 | |
| 	return req.Method
 | |
| }
 | |
| 
 | |
| func (req MessageTextSearchQuery) GetValue() interface{} {
 | |
| 	return req.Value
 | |
| }
 | |
| 
 | |
| func (key MessageTextSearchKey) ToColumnName() string {
 | |
| 	switch iam_model.MessageTextSearchKey(key) {
 | |
| 	case iam_model.MessageTextSearchKeyAggregateID:
 | |
| 		return MessageTextKeyAggregateID
 | |
| 	case iam_model.MessageTextSearchKeyMessageTextType:
 | |
| 		return MessageTextKeyMessageTextType
 | |
| 	case iam_model.MessageTextSearchKeyLanguage:
 | |
| 		return MessageTextKeyLanguage
 | |
| 	default:
 | |
| 		return ""
 | |
| 	}
 | |
| }
 |