equal
deleted
inserted
replaced
|
1 package sqwl.cms |
|
2 |
|
3 import java.nio.file.Path |
|
4 |
|
5 trait Named { |
|
6 def name: String |
|
7 } |
|
8 |
|
9 trait Navigable { |
|
10 def pathSegment: String |
|
11 } |
|
12 |
|
13 trait iCategory extends Named with Navigable |
|
14 |
|
15 trait iTag extends Named with Navigable |
|
16 |
|
17 trait iArticle extends Navigable { |
|
18 def title: String |
|
19 def htmlContent: String |
|
20 def category: Option[iCategory] |
|
21 def tags: Seq[iTag] |
|
22 def assets: Path |
|
23 } |
|
24 |
|
25 trait iContent { |
|
26 def articlesByTag(t: iTag): Seq[iArticle] |
|
27 def articlesByCategory(c: iCategory): Seq[iArticle] |
|
28 def tags: Seq[iTag] |
|
29 def categories: Seq[iCategory] |
|
30 def articleByPath(path: String): Option[iArticle] |
|
31 def categoryByPath(path: String): Option[iCategory] |
|
32 def tagByPath(path: String): Option[iTag] |
|
33 } |