feat(core): add model tag to ticket comment category

ref: #807 #798
This commit is contained in:
2025-06-09 09:56:46 +09:30
parent 2d3e496e32
commit 7480b371aa
2 changed files with 45 additions and 4 deletions

View File

@ -0,0 +1,39 @@
# Generated by Django 5.1.9 on 2025-06-09 00:26
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("assistance", "0013_alter_modelknowledgebasearticle_model"),
("core", "0032_alter_ticketcategory_parent_and_more"),
]
operations = [
migrations.AlterField(
model_name="ticketcommentcategory",
name="parent",
field=models.ForeignKey(
blank=True,
help_text="The Parent Category",
null=True,
on_delete=django.db.models.deletion.PROTECT,
to="core.ticketcommentcategory",
verbose_name="Parent Category",
),
),
migrations.AlterField(
model_name="ticketcommentcategory",
name="runbook",
field=models.ForeignKey(
blank=True,
help_text="The runbook for this category",
null=True,
on_delete=django.db.models.deletion.PROTECT,
to="assistance.knowledgebase",
verbose_name="Runbook",
),
),
]

View File

@ -12,6 +12,8 @@ class TicketCommentCategory(
CenturionModel,
):
model_tag = 'ticket_comment_category'
class Meta:
@ -26,10 +28,10 @@ class TicketCommentCategory(
parent = models.ForeignKey(
'self',
blank= True,
blank = True,
help_text = 'The Parent Category',
null = True,
on_delete = models.SET_NULL,
on_delete = models.PROTECT,
verbose_name = 'Parent Category',
)
@ -42,10 +44,10 @@ class TicketCommentCategory(
runbook = models.ForeignKey(
KnowledgeBase,
blank= True,
blank = True,
help_text = 'The runbook for this category',
null = True,
on_delete = models.SET_NULL,
on_delete = models.PROTECT,
verbose_name = 'Runbook',
)