Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: feedback timestamp #37

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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