24 lines
484 B
Go
24 lines
484 B
Go
package serie
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"git.rdelaage.ovh/rdelaage/cyanocorax/model/page"
|
|
)
|
|
|
|
type Serie struct {
|
|
Name string `json:"name"`
|
|
Feedable bool `json:"feedable"`
|
|
Prefix string `json:"prefix"`
|
|
Abstract []string `json:"abstract"`
|
|
Pages []page.Page `json:"pages"`
|
|
}
|
|
|
|
func (s *Serie) GetAbstract() string {
|
|
return strings.Join(s.Abstract, "\n")
|
|
}
|
|
|
|
func (s *Serie) SetAbstract(newAbstract string) {
|
|
s.Abstract = strings.Split(newAbstract, "\n")
|
|
}
|