Skip to content

Commit e81af3f

Browse files
committed
rename file for test conventions
1 parent 126d9f7 commit e81af3f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

structs_test.go

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package carta
2+
3+
// Label represents a label associated with a blog post.
4+
type Label struct {
5+
ID *int `db:"id"`
6+
Name *string `db:"name"`
7+
}
8+
9+
// PostWithLabels represents a blog post that has multiple labels.
10+
type PostWithLabels struct {
11+
ID int `db:"id"`
12+
Title string `db:"title"`
13+
Labels []Label `carta:"labels"`
14+
}
15+
16+
// BlogWithPosts represents a blog that has multiple posts.
17+
type BlogWithPosts struct {
18+
ID int `db:"id"`
19+
Name string `db:"name"`
20+
Posts []PostWithLabels `carta:"posts"`
21+
}

0 commit comments

Comments
 (0)