-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdeer_tables_examples.ex
More file actions
83 lines (77 loc) · 2.79 KB
/
deer_tables_examples.ex
File metadata and controls
83 lines (77 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
defmodule DeerStorage.DeerTablesExamples do
use Gettext, backend: DeerStorageWeb.Gettext
def list_examples do
[
list_item("classroom"),
list_item("school"),
list_item("veterinary_clinic"),
list_item("family")
]
end
def show("classroom") do
{
gettext("Classroom (for teachers)"),
gettext(
"A good example to start working with a students database. It has students lists, lessons, homeworks to upload and grades"
),
[
{gettext("Students"), [pgettext("people", "Name"), gettext("Date of birth")]},
{gettext("Lesson"), [gettext("Subject")]},
{gettext("Exams"), [gettext("Subject"), gettext("Grade"), gettext("Description")]},
{gettext("Grades"), [gettext("Name"), gettext("Grade"), gettext("Description")]}
]
}
end
def show("school") do
{
gettext("School (for educational institutions)"),
gettext(
"More comprehensive example on how school data could be arranged. It consists of teachers, students, classes, lessons, grades, homeworks and exams"
),
[
{gettext("Teachers"), [pgettext("people", "Name"), gettext("Area of expertise")]},
{gettext("Classes"), [gettext("Name"), gettext("Year")]},
{gettext("Students"), [pgettext("people", "Name"), gettext("Date of birth")]},
{gettext("Lessons"), [gettext("Subject")]},
{gettext("Grades"), [gettext("Name"), gettext("Grade"), gettext("Description")]},
{gettext("Homeworks"), [gettext("Class"), gettext("Deadline"), gettext("Description")]}
]
}
end
def show("family") do
{
gettext("Family"),
gettext(
"You can store your pictures, tickets, agreements with kids and everything you can think of related to your family"
),
[
{gettext("Pictures"),
[gettext("Collection name"), gettext("Event/Trip"), gettext("Place")]},
{gettext("Tickets"),
[gettext("Type of ticket"), gettext("Date"), gettext("Country/place")]},
{gettext("Agreements with kids"),
[
gettext("Name of agreement"),
gettext("Promise"),
gettext("Conditions"),
gettext("Deadline")
]}
]
}
end
def show("veterinary_clinic") do
{
gettext("Veterinary clinic"),
gettext(
"You can use it as a starter to work with animal patients. Out of the box you get animals, clients, invoices and visits."
),
[
{gettext("Animals"), [pgettext("people", "Name"), gettext("Year of birth")]},
{gettext("Clients"), [pgettext("people", "Name"), gettext("Phone number")]},
{gettext("Invoices"), [gettext("Invoice number")]},
{gettext("Visits"), [gettext("Date")]}
]
}
end
defp list_item(key), do: {key, show(key)}
end