mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
70 lines
3.9 KiB
70 lines
3.9 KiB
5 years ago
|
# Generated by Django 2.2.5 on 2019-11-07 08:02
|
||
5 years ago
|
|
||
|
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(
|
||
5 years ago
|
name='Ticket',
|
||
5 years ago
|
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')),
|
||
|
('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')),
|
||
5 years ago
|
('type', models.CharField(default='general', max_length=16, verbose_name='Type')),
|
||
|
('status', models.CharField(choices=[('open', 'Open'), ('closed', 'Closed')], default='open', max_length=16)),
|
||
|
('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',),
|
||
|
},
|
||
|
),
|
||
|
migrations.CreateModel(
|
||
|
name='LoginConfirmTicket',
|
||
|
fields=[
|
||
|
('ticket_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='tickets.Ticket')),
|
||
5 years ago
|
('ip', models.GenericIPAddressField(blank=True, null=True)),
|
||
|
('city', models.CharField(blank=True, default='', max_length=16)),
|
||
5 years ago
|
('action', models.CharField(blank=True, choices=[('approve', 'Approve'), ('reject', 'Reject')], default='', max_length=16)),
|
||
5 years ago
|
],
|
||
|
options={
|
||
|
'abstract': False,
|
||
|
},
|
||
5 years ago
|
bases=('tickets.ticket',),
|
||
5 years ago
|
),
|
||
|
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')),
|
||
5 years ago
|
('ticket', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tickets.Ticket')),
|
||
5 years ago
|
('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',),
|
||
|
},
|
||
|
),
|
||
|
]
|