Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7057d06

Browse files
committed
updated
1 parentf8f6fbb commit7057d06

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

‎models/user.model.go

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
package models
22

33
import (
4+
"time"
5+
46
"github.com/google/uuid"
57
)
68

79
typeUserstruct {
8-
ID uuid.UUID`gorm:"type:uuid;default:uuid_generate_v4();primary_key"`
9-
Namestring`gorm:"type:varchar(255)"`
10-
Emailstring`gorm:"uniqueIndex"`
11-
}
12-
13-
func (User)UsersTable()string {
14-
return"users"
10+
ID uuid.UUID`gorm:"type:uuid;default:uuid_generate_v4();primary_key"`
11+
// ID uint `gorm:"primary_key"`
12+
Namestring`gorm:"type:varchar(255);not null"`
13+
Emailstring`gorm:"uniqueIndex;not null"`
14+
CreatedAt time.Time
15+
UpdatedAt time.Time
1516
}

‎readMe.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
#Build Golang RESTful API with Gorm, Gin and Postgres
1+
#Build Golang RESTful API with Gorm, Gin and Postgres
2+
3+
###How to Setup Golang GORM RESTful API Project with Postgres
4+
5+
[How to Setup Golang GORM RESTful API Project with Postgres](https://codevoweb.com/setup-golang-gorm-restful-api-project-with-postgres/)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp