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