Skip to content

Commit

Permalink
fix: feedback timestamp (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
ImSoZRious authored Jan 17, 2024
1 parent f468c3f commit 1c57793
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 22 deletions.
48 changes: 26 additions & 22 deletions internal/model/feedback.model.go
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
package model

import "time"

type FirstpartAnswer string

type SecondPartAnswer string

type Feedback struct {
User User `gorm:"foreignKey:UserId;references:Id"`
UserId int `gorm:""`
Q1 FirstpartAnswer `gorm:""`
Q2 FirstpartAnswer `gorm:""`
Q3 FirstpartAnswer `gorm:""`
Q4 FirstpartAnswer `gorm:""`
Q5 FirstpartAnswer `gorm:""`
Q6 FirstpartAnswer `gorm:""`
Q7 SecondPartAnswer `gorm:""`
Q8 SecondPartAnswer `gorm:""`
Q9 SecondPartAnswer `gorm:""`
Q10 SecondPartAnswer `gorm:""`
Q11 SecondPartAnswer `gorm:""`
Q12 SecondPartAnswer `gorm:""`
Q13 SecondPartAnswer `gorm:""`
Q14 SecondPartAnswer `gorm:""`
Q15 SecondPartAnswer `gorm:""`
Q16 SecondPartAnswer `gorm:""`
Q17 SecondPartAnswer `gorm:""`
Q18 SecondPartAnswer `gorm:""`
Q19 SecondPartAnswer `gorm:""`
Comment string `gorm:""`
User User `gorm:"foreignKey:UserId;references:Id"`
UserId int `gorm:""`
CreatedAt time.Time `gorm:"autoCreateTime"`
UpdatedAt time.Time `gorm:"autoUpdateTime:milli"`
Q1 FirstpartAnswer `gorm:""`
Q2 FirstpartAnswer `gorm:""`
Q3 FirstpartAnswer `gorm:""`
Q4 FirstpartAnswer `gorm:""`
Q5 FirstpartAnswer `gorm:""`
Q6 FirstpartAnswer `gorm:""`
Q7 SecondPartAnswer `gorm:""`
Q8 SecondPartAnswer `gorm:""`
Q9 SecondPartAnswer `gorm:""`
Q10 SecondPartAnswer `gorm:""`
Q11 SecondPartAnswer `gorm:""`
Q12 SecondPartAnswer `gorm:""`
Q13 SecondPartAnswer `gorm:""`
Q14 SecondPartAnswer `gorm:""`
Q15 SecondPartAnswer `gorm:""`
Q16 SecondPartAnswer `gorm:""`
Q17 SecondPartAnswer `gorm:""`
Q18 SecondPartAnswer `gorm:""`
Q19 SecondPartAnswer `gorm:""`
Comment string `gorm:""`
}
2 changes: 2 additions & 0 deletions migrations/04-feedback.sql
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ CREATE TYPE feedback_second_part_answer AS ENUM (

CREATE TABLE feedbacks (
"user_id" INT NOT NULL,
"created_at" timestamptz NOT NULL,
"updated_at" timestamptz NOT NULL,
"q1" feedback_first_part_answer NOT NULL,
"q2" feedback_first_part_answer NOT NULL,
"q3" feedback_first_part_answer NOT NULL,
Expand Down

0 comments on commit 1c57793

Please sign in to comment.