diff --git a/ttadmin/help/migrations/0005_emailtemplate.py b/ttadmin/help/migrations/0005_emailtemplate.py new file mode 100644 index 0000000..5bac1c7 --- /dev/null +++ b/ttadmin/help/migrations/0005_emailtemplate.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.2 on 2019-07-20 01:40 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('help', '0004_ticket_submitted'), + ] + + operations = [ + migrations.CreateModel( + name='EmailTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=50)), + ('body', models.TextField()), + ], + ), + ] diff --git a/ttadmin/help/models.py b/ttadmin/help/models.py index 70609aa..4c60ecd 100644 --- a/ttadmin/help/models.py +++ b/ttadmin/help/models.py @@ -46,3 +46,11 @@ class Note(Model): def __str__(self): return "admin note" + + +class EmailTemplate(Model): + name = CharField(blank=False, null=False, max_length=50) + body = TextField(blank=False, null=False) + + def __str__(self): + return f"'{self.name}' email template"