aboutsummaryrefslogtreecommitdiff
path: root/internal/model/item.go
diff options
context:
space:
mode:
author2026-03-14 00:44:19 +0300
committer2026-03-14 00:44:19 +0300
commite5d6f4c02b757c83244ba5e04fead08623a27299 (patch)
tree5b5babb9887cafa3dbc165928dc2b0fd65265bda /internal/model/item.go
downloadpose-master.tar.gz
pose-master.tar.bz2
pose-master.tar.xz
pose-master.zip
начальный коммитHEADmaster
Diffstat (limited to 'internal/model/item.go')
-rw-r--r--internal/model/item.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/internal/model/item.go b/internal/model/item.go
new file mode 100644
index 0000000..c18d830
--- /dev/null
+++ b/internal/model/item.go
@@ -0,0 +1,24 @@
+package model
+
+import (
+ "fmt"
+ "time"
+)
+
+type Item struct {
+ ID string
+ Date time.Time
+ Title string
+ Summary string
+ Link string
+ Img string
+}
+
+func (it *Item) BuildMessage() string {
+ return fmt.Sprintf(
+ `<b>%s</b><br /><br />%s<br />Читать дальше: <a href="%[3]s">%[3]s</a>`,
+ it.Title,
+ it.Summary,
+ it.Link,
+ )
+}