2019-11-15 10:55:35 +00:00
|
|
|
# Generated by Django 2.2.5 on 2019-11-15 06:57
|
2019-10-31 10:23:43 +00:00
|
|
|
|
2019-11-15 10:55:35 +00:00
|
|
|
import common.fields.model
|
2019-10-31 10:23:43 +00:00
|
|
|
from django.conf import settings
|
|
|
|
from django.db import migrations, models
|
|
|
|
import django.db.models.deletion
|
|
|
|
import uuid
|
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2019-11-07 10:06:58 +00:00
|
|
|
name='Ticket',
|
2019-10-31 10:23:43 +00:00
|
|
|
fields=[
|
|
|
|
('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
|
|
|
|
('created_by', models.CharField(blank=True, max_length=32, null=True, verbose_name='Created by')),
|
|
|
|
('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Date created')),
|
|
|
|
('date_updated', models.DateTimeField(auto_now=True, verbose_name='Date updated')),
|
|
|
|
('user_display', models.CharField(max_length=128, verbose_name='User display name')),
|
|
|
|
('title', models.CharField(max_length=256, verbose_name='Title')),
|
|
|
|
('body', models.TextField(verbose_name='Body')),
|
2019-11-15 10:55:35 +00:00
|
|
|
('meta', common.fields.model.JsonDictTextField(default='{}', verbose_name='Meta')),
|
2019-10-31 10:23:43 +00:00
|
|
|
('assignee_display', models.CharField(blank=True, max_length=128, null=True, verbose_name='Assignee display name')),
|
|
|
|
('assignees_display', models.CharField(blank=True, max_length=128, verbose_name='Assignees display name')),
|
2019-11-15 10:55:35 +00:00
|
|
|
('type', models.CharField(choices=[('general', 'General'), ('login_confirm', 'Login confirm')], default='general', max_length=16, verbose_name='Type')),
|
2019-11-07 10:06:58 +00:00
|
|
|
('status', models.CharField(choices=[('open', 'Open'), ('closed', 'Closed')], default='open', max_length=16)),
|
2019-11-15 10:55:35 +00:00
|
|
|
('action', models.CharField(blank=True, choices=[('approve', 'Approve'), ('reject', 'Reject')], default='', max_length=16)),
|
2019-11-07 10:06:58 +00:00
|
|
|
('assignee', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='ticket_handled', to=settings.AUTH_USER_MODEL, verbose_name='Assignee')),
|
|
|
|
('assignees', models.ManyToManyField(related_name='ticket_assigned', to=settings.AUTH_USER_MODEL, verbose_name='Assignees')),
|
|
|
|
('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='ticket_requested', to=settings.AUTH_USER_MODEL, verbose_name='User')),
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
'ordering': ('-date_created',),
|
|
|
|
},
|
|
|
|
),
|
2019-10-31 10:23:43 +00:00
|
|
|
migrations.CreateModel(
|
|
|
|
name='Comment',
|
|
|
|
fields=[
|
|
|
|
('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
|
|
|
|
('created_by', models.CharField(blank=True, max_length=32, null=True, verbose_name='Created by')),
|
|
|
|
('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Date created')),
|
|
|
|
('date_updated', models.DateTimeField(auto_now=True, verbose_name='Date updated')),
|
|
|
|
('user_display', models.CharField(max_length=128, verbose_name='User display name')),
|
|
|
|
('body', models.TextField(verbose_name='Body')),
|
2019-11-15 10:55:35 +00:00
|
|
|
('ticket', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='tickets.Ticket')),
|
2019-10-31 10:23:43 +00:00
|
|
|
('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='comments', to=settings.AUTH_USER_MODEL, verbose_name='User')),
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
'ordering': ('date_created',),
|
|
|
|
},
|
|
|
|
),
|
|
|
|
]
|