Skip to content

Commit a0bbb1b

Browse files
committed
feat: Add schema file
Changes made: - Added models.go
1 parent 2a8992b commit a0bbb1b

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

models/models.go

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package models
2+
3+
import "time"
4+
5+
type User struct {
6+
ID int `db:"id"`
7+
Name string `db:"name"`
8+
CreatedAt time.Time `db:"created_at"`
9+
}
10+
11+
type Hashtag struct {
12+
ID int `db:"id"`
13+
Name string `db:"name"`
14+
CreatedAt time.Time `db:"created_at"`
15+
}
16+
17+
type Project struct {
18+
ID int `db:"id"`
19+
Name string `db:"name"`
20+
Slug string `db:"slug"`
21+
Description string `db:"description"`
22+
CreatedAt time.Time `db:"created_at"`
23+
}
24+
25+
type ProjectHashtag struct {
26+
HashtagID int `db:"hashtag_id"`
27+
ProjectID int `db:"project_id"`
28+
}
29+
30+
type UserProject struct {
31+
ProjectID int `db:"project_id"`
32+
UserID int `db:"user_id"`
33+
}

models/project.go

Whitespace-only changes.

0 commit comments

Comments
 (0)