diff options
author | jan <jan@ruken.pw> | 2016-10-12 14:03:40 (UTC) |
---|---|---|
committer | jan <jan@ruken.pw> | 2016-10-12 14:03:40 (UTC) |
commit | def8ba82c69891244eb0f8eebe0cb0b3bb23955b (patch) | |
tree | d126befcea381077bd3074661821602d4b0c4c42 /models | |
parent | c6165a8bbcca97867205fa87456ba238beb760f9 (diff) |
alle models verschoben
Diffstat (limited to 'models')
-rw-r--r-- | models/gril.go | 4 | ||||
-rw-r--r-- | models/list.go | 25 | ||||
-rw-r--r-- | models/series.go | 11 |
3 files changed, 37 insertions, 3 deletions
diff --git a/models/gril.go b/models/gril.go index f0b8f8f..0ee0f84 100644 --- a/models/gril.go +++ b/models/gril.go | |||
@@ -7,8 +7,6 @@ import ( | |||
7 | "strings" | 7 | "strings" |
8 | "time" | 8 | "time" |
9 | 9 | ||
10 | "fagott.pw/grilist/modules/series" | ||
11 | |||
12 | "github.com/lib/pq" | 10 | "github.com/lib/pq" |
13 | ) | 11 | ) |
14 | 12 | ||
@@ -38,7 +36,7 @@ type Gril struct { | |||
38 | ForeignIDs map[DataSource]int | 36 | ForeignIDs map[DataSource]int |
39 | UpdatedAt time.Time | 37 | UpdatedAt time.Time |
40 | Lists []int | 38 | Lists []int |
41 | Series []series.Series | 39 | Series []Series |
42 | } | 40 | } |
43 | 41 | ||
44 | // Der kram hier sollte eigentlich auch eher wo anders hin als ins Model, oder?! | 42 | // Der kram hier sollte eigentlich auch eher wo anders hin als ins Model, oder?! |
diff --git a/models/list.go b/models/list.go new file mode 100644 index 0000000..1d67546 --- /dev/null +++ b/models/list.go | |||
@@ -0,0 +1,25 @@ | |||
1 | package models | ||
2 | |||
3 | import ( | ||
4 | "database/sql" | ||
5 | |||
6 | "fagott.pw/charakterin" | ||
7 | "github.com/lib/pq" | ||
8 | ) | ||
9 | |||
10 | // List ist eine Liste an DINGEN. | ||
11 | type List struct { | ||
12 | ID int | ||
13 | Name string | ||
14 | Description string | ||
15 | Owner *charakterin.User | ||
16 | ForkOf sql.NullInt64 | ||
17 | UpdatedAt pq.NullTime | ||
18 | Grils []*ListGril | ||
19 | } | ||
20 | |||
21 | // ListGril ist ein geranktes Gril | ||
22 | type ListGril struct { | ||
23 | Gril *Gril | ||
24 | Order int | ||
25 | } | ||
diff --git a/models/series.go b/models/series.go new file mode 100644 index 0000000..1ae3aa6 --- /dev/null +++ b/models/series.go | |||
@@ -0,0 +1,11 @@ | |||
1 | package models | ||
2 | |||
3 | type Series struct { | ||
4 | ID int | ||
5 | Name string | ||
6 | KanjiName string | ||
7 | RomajiName string | ||
8 | FuriganaName string | ||
9 | OtherNames []string | ||
10 | Tags []string | ||
11 | } | ||