|
24
|
1 |
""" |
|
|
2 |
irinotes core module |
|
|
3 |
""" |
|
|
4 |
from django.conf import settings |
|
|
5 |
from django.db import models |
|
|
6 |
from django.utils.translation import ugettext_lazy as _ |
|
|
7 |
|
|
|
8 |
from .base import Model |
|
|
9 |
|
|
|
10 |
|
|
|
11 |
class Session(Model): |
|
|
12 |
class Meta: |
|
|
13 |
verbose_name = _('Session') |
|
|
14 |
verbose_name_plural = _('Sessions') |
|
|
15 |
|
|
|
16 |
owner = models.ForeignKey( |
|
|
17 |
settings.AUTH_USER_MODEL, |
|
|
18 |
on_delete=models.CASCADE, |
|
|
19 |
) |
|
|
20 |
title = models.TextField(null=True, blank=True, verbose_name=_('Session|title')) |
|
|
21 |
description = models.TextField(null=True, blank=True, verbose_name=_('Session|description')) |
|
|
22 |
protocol = models.TextField(null=True, blank=True, verbose_name=_('Session|protocol')) |
|
|
23 |
|
|
|
24 |
class Note(Model): |
|
|
25 |
class Meta: |
|
|
26 |
verbose_name = _('Note') |
|
|
27 |
verbose_name_plural = _('Notes') |
|
|
28 |
ordering = ["tc_start"] |
|
|
29 |
|
|
|
30 |
tc_start = models.DateTimeField(verbose_name=_('Note|tc_start')) |
|
|
31 |
tc_end = models.DateTimeField(verbose_name=_('Note|tc_end')) |
|
|
32 |
session = models.ForeignKey(Session, on_delete=models.CASCADE, verbose_name=_('Note|session')) |
|
|
33 |
text_plain = models.TextField(null=True, blank=True, verbose_name=_('Note|text_plain')) |
|
|
34 |
text_html = models.TextField(null=True, blank=True, verbose_name=_('Note|text_html')) |
|
|
35 |
text_raw = models.TextField(null=True, blank=True, verbose_name=_('Note|text_raw')) |
|
|
36 |
margin_note = models.TextField(null=True, blank=True, verbose_name=_('Note|margin_note')) |
|
|
37 |
categorization = models.TextField(null=True, blank=True, verbose_name=_('Note|categorization')) |
|
|
38 |
|