-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
56 lines (49 loc) · 1.39 KB
/
models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// models.go this is our database models
package main
import "gorm.io/gorm"
type User struct {
gorm.Model
Name string
Email string `gorm:"uniqueIndex"`
Password string
}
type Website struct {
gorm.Model
UserID uint `json:"user_id"`
Title string `json:"title"`
Description string `json:"description"`
URL string `json:"url"`
Content string `json:"content"` // For markdown content
}
type MusicWork struct {
gorm.Model
UserID uint `json:"user_id"`
Title string `json:"title"`
Description string `json:"description"`
URL string `json:"url"` // For embedded videos or audio
Content string `json:"content"` // For markdown content
}
type Contribution struct {
gorm.Model
UserID uint `json:"user_id"`
Title string `json:"title"`
Description string `json:"description"`
URL string `json:"url"`
Content string `json:"content"` // For markdown content
}
type Skill struct {
gorm.Model
UserID uint `json:"user_id"`
Name string `json:"name"`
Description string `json:"description"`
}
type Education struct {
gorm.Model
UserID uint `json:"user_id"`
Institution string `json:"institution"`
Degree string `json:"degree"`
FieldOfStudy string `json:"field_of_study"`
StartDate string `json:"start_date"`
EndDate string `json:"end_date"`
Description string `json:"description"`
}