File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ require (
99 github.com/joho/godotenv v1.5.1
1010 github.com/testcontainers/testcontainers-go v0.37.0
1111 github.com/testcontainers/testcontainers-go/modules/mysql v0.37.0
12+ gorm.io/gorm v1.26.1
1213)
1314
1415require (
@@ -88,6 +89,4 @@ require (
8889 google.golang.org/grpc v1.70.0 // indirect
8990 google.golang.org/protobuf v1.36.6 // indirect
9091 gopkg.in/yaml.v3 v3.0.1 // indirect
91- gorm.io/driver/mysql v1.5.7 // indirect
92- gorm.io/gorm v1.26.1 // indirect
9392)
Original file line number Diff line number Diff line change @@ -64,7 +64,6 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn
6464github.com/go-playground/universal-translator v0.18.1 /go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY =
6565github.com/go-playground/validator/v10 v10.26.0 h1:SP05Nqhjcvz81uJaRfEV0YBSSSGMc/iMaVtFbr3Sw2k =
6666github.com/go-playground/validator/v10 v10.26.0 /go.mod h1:I5QpIEbmr8On7W0TktmJAumgzX4CA1XNl4ZmDuVHKKo =
67- github.com/go-sql-driver/mysql v1.7.0 /go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI =
6867github.com/go-sql-driver/mysql v1.9.2 h1:4cNKDYQ1I84SXslGddlsrMhc8k4LeDVj6Ad6WRjiHuU =
6968github.com/go-sql-driver/mysql v1.9.2 /go.mod h1:qn46aNg1333BRMNU69Lq93t8du/dwxI64Gl8i5p1WMU =
7069github.com/goccy/go-json v0.10.5 h1:Fq85nIqj+gXn/S5ahsiTlK3TmC85qgirsdTP/+DeaC4 =
@@ -250,9 +249,6 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EV
250249gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c /go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM =
251250gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA =
252251gopkg.in/yaml.v3 v3.0.1 /go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM =
253- gorm.io/driver/mysql v1.5.7 h1:MndhOPYOfEp2rHKgkZIhJ16eVUIRf2HmzgoPmh7FCWo =
254- gorm.io/driver/mysql v1.5.7 /go.mod h1:sEtPWMiqiN1N1cMXoXmBbd8C6/l+TESwriotuRRpkDM =
255- gorm.io/gorm v1.25.7 /go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8 =
256252gorm.io/gorm v1.26.1 h1:ghB2gUI9FkS46luZtn6DLZ0f6ooBJ5IbVej2ENFDjRw =
257253gorm.io/gorm v1.26.1 /go.mod h1:8Z33v652h4//uMA76KjeDH8mJXPm1QNCYrMeatR0DOE =
258254gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU =
Original file line number Diff line number Diff line change 1+ package models
2+
3+ import "gorm.io/gorm"
4+
5+ type Task struct {
6+ gorm.Model
7+
8+ UserID uint
9+ Type string
10+ Completed bool
11+ Title string
12+ EstimatedMinutes int
13+ }
14+
15+ type TaskType struct {
16+ gorm.Model
17+
18+ UserID uint `gorm:"nullable"`
19+ Type string
20+ }
You can’t perform that action at this time.
0 commit comments