add sessionUUID and feedbackUUID to feedback card
This commit is contained in:
@@ -78,10 +78,12 @@ func feedbacksToAPI(feedbacks []*dmodels.Feedback) []*models.Feedback {
|
||||
|
||||
func feedbackToAPI(feedback *dmodels.Feedback) *models.Feedback {
|
||||
return &models.Feedback{
|
||||
ProjectID: feedback.ProjectID,
|
||||
Text: feedback.Text,
|
||||
Type: string(feedback.Type),
|
||||
UserID: feedback.UserID,
|
||||
CreatedAt: strfmt.DateTime(feedback.CreatedAt),
|
||||
FeedbackUUID: feedback.UUID,
|
||||
SessionUUID: feedback.SessionUUID,
|
||||
ProjectID: feedback.ProjectID,
|
||||
Text: feedback.Text,
|
||||
Type: string(feedback.Type),
|
||||
UserID: feedback.UserID,
|
||||
CreatedAt: strfmt.DateTime(feedback.CreatedAt),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,14 +24,20 @@ type Feedback struct {
|
||||
// Format: date-time
|
||||
CreatedAt strfmt.DateTime `json:"created_at,omitempty"`
|
||||
|
||||
// feedback uuid
|
||||
FeedbackUUID string `json:"feedback_uuid,omitempty"`
|
||||
|
||||
// to have more context about the project
|
||||
ProjectID string `json:"project_id,omitempty"`
|
||||
|
||||
// session uuid
|
||||
SessionUUID string `json:"session_uuid,omitempty"`
|
||||
|
||||
// text
|
||||
Text string `json:"text,omitempty"`
|
||||
|
||||
// type
|
||||
// Enum: [feature_request feedback support]
|
||||
// Enum: [feature feedback support]
|
||||
Type string `json:"type,omitempty"`
|
||||
|
||||
// to have more context about the user
|
||||
@@ -72,7 +78,7 @@ var feedbackTypeTypePropEnum []interface{}
|
||||
|
||||
func init() {
|
||||
var res []string
|
||||
if err := json.Unmarshal([]byte(`["feature_request","feedback","support"]`), &res); err != nil {
|
||||
if err := json.Unmarshal([]byte(`["feature","feedback","support"]`), &res); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
for _, v := range res {
|
||||
@@ -82,8 +88,8 @@ func init() {
|
||||
|
||||
const (
|
||||
|
||||
// FeedbackTypeFeatureRequest captures enum value "feature_request"
|
||||
FeedbackTypeFeatureRequest string = "feature_request"
|
||||
// FeedbackTypeFeature captures enum value "feature"
|
||||
FeedbackTypeFeature string = "feature"
|
||||
|
||||
// FeedbackTypeFeedback captures enum value "feedback"
|
||||
FeedbackTypeFeedback string = "feedback"
|
||||
|
||||
@@ -177,17 +177,23 @@ func init() {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"feedback_uuid": {
|
||||
"type": "string"
|
||||
},
|
||||
"project_id": {
|
||||
"description": "to have more context about the project",
|
||||
"type": "string"
|
||||
},
|
||||
"session_uuid": {
|
||||
"type": "string"
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"feature_request",
|
||||
"feature",
|
||||
"feedback",
|
||||
"support"
|
||||
]
|
||||
@@ -360,17 +366,23 @@ func init() {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"feedback_uuid": {
|
||||
"type": "string"
|
||||
},
|
||||
"project_id": {
|
||||
"description": "to have more context about the project",
|
||||
"type": "string"
|
||||
},
|
||||
"session_uuid": {
|
||||
"type": "string"
|
||||
},
|
||||
"text": {
|
||||
"type": "string"
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"feature_request",
|
||||
"feature",
|
||||
"feedback",
|
||||
"support"
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user