Django Models Reference¶
Version: Arctyk ITSM v0.6.0+
Last Updated: January 2026
Complete reference for all Django models in Arctyk ITSM.
Ticket Model¶
App: tickets
Table: tickets_ticket
Fields:
id- AutoField (Primary key)ticket_number- PositiveIntegerField (Unique, auto-generated)title- CharField(max_length=200, required)description- TextField (Rich HTML content via TinyMCE)status- CharField(max_length=20, choices from STATUS_CHOICES)status_category- CharField (Derived: 'todo', 'in_progress', 'done')priority- CharField(max_length=10, choices: low/medium/high/critical)issue_type- CharField(max_length=20, choices: bug/task/story/epic)assignee- ForeignKey(User, null=True, related_name='assigned_tickets')reporter- ForeignKey(User, null=True, related_name='reported_tickets')project- ForeignKey(Project, null=True, related_name='tickets')response_target- DateTimeField(null=True) (v0.6.0+)resolution_target- DateTimeField(null=True) (v0.6.0+)created_at- DateTimeField(auto_now_add=True)updated_at- DateTimeField(auto_now=True)first_responded_at- DateTimeField(null=True) (v0.6.0+)resolved_at- DateTimeField(null=True) (v0.6.0+)closed_at- DateTimeField(null=True) (v0.6.0+)is_recurring- BooleanField(default=False)recurrence_interval- CharField(null=True, choices: daily/weekly/monthly)next_occurrence- DateTimeField(null=True)
Methods:
get_absolute_url()- Returns ticket detail URLget_available_transitions()- Returns valid status transitionsschedule_next_occurrence()- Calculates next recurring date
Related Names:
comments- All Comment objects for this ticket (v0.6.0+)
Comment Model (v0.6.0+)¶
App: tickets
Table: tickets_comment
Fields:
id- AutoField (Primary key)ticket- ForeignKey(Ticket, on_delete=CASCADE, related_name='comments')author- ForeignKey(User, on_delete=CASCADE, related_name='ticket_comments')content- TextField (Rich HTML content via TinyMCE)comment_type- CharField(max_length=10, choices: 'public'/'internal', default='public')created_at- DateTimeField(auto_now_add=True)updated_at- DateTimeField(auto_now=True)edited_at- DateTimeField(null=True)is_deleted- BooleanField(default=False)deleted_at- DateTimeField(null=True)deleted_by- ForeignKey(User, null=True, related_name='deleted_comments')edited_by- ForeignKey(User, null=True, related_name='edited_comments')
Properties:
is_internal- Returns True if comment_type == 'internal'is_edited- Returns True if edited_at is not None
Related Names:
edit_history- All CommentEditHistory objects for this comment
CommentEditHistory Model (v0.6.0+)¶
App: tickets
Table: tickets_commentedithistory
Fields:
id- AutoField (Primary key)comment- ForeignKey(Comment, on_delete=CASCADE, related_name='edit_history')edited_by- ForeignKey(User, on_delete=SET_NULL, null=True)previous_content- TextField (Content before edit)edited_at- DateTimeField(auto_now_add=True)
Project Model¶
App: projects
Table: projects_project
Fields:
id- AutoField (Primary key)name- CharField(max_length=255, required)description- TextField(blank=True)created_at- DateTimeField(auto_now_add=True)updated_at- DateTimeField(auto_now=True)
Related Names:
tickets- All Ticket objects associated with this project
Asset Model¶
App: inventory
Table: inventory_asset
Fields:
id- AutoField (Primary key)name- CharField(max_length=255, required)asset_type- CharField(max_length=50)serial_number- CharField(max_length=100, unique=True)status- CharField(max_length=20, choices)location- CharField(max_length=255, blank=True)assigned_to- ForeignKey(User, null=True)purchase_date- DateField(null=True)warranty_expiry- DateField(null=True)created_at- DateTimeField(auto_now_add=True)updated_at- DateTimeField(auto_now=True)
ChangeLog Model¶
App: changelog
Table: changelog_changelog
Fields:
id- AutoField (Primary key)content_type- ForeignKey(ContentType, on_delete=CASCADE)object_id- PositiveIntegerFieldcontent_object- GenericForeignKey('content_type', 'object_id')changed_by- ForeignKey(User, on_delete=SET_NULL, null=True)timestamp- DateTimeField(auto_now_add=True)ip_address- GenericIPAddressField(null=True)change_summary- TextFieldaction- CharField(max_length=10, choices: create/update/delete)
Usage:
Automatically tracks all changes to Ticket, Asset, and other tracked models via signals.
RecurringTaskTemplate Model¶
App: tickets
Table: tickets_recurringtasktemplate
Fields:
id- AutoField (Primary key)ticket- ForeignKey(Ticket, related_name='recurring_template')recurrence_pattern- CharField(choices: daily/weekly/monthly)recurrence_interval- PositiveIntegerField(default=1)next_run- DateTimeFieldis_active- BooleanField(default=True)created_at- DateTimeField(auto_now_add=True)
RecurringTicketRun Model¶
App: tickets
Table: tickets_recurringticketrun
Fields:
id- AutoField (Primary key)template- ForeignKey(RecurringTaskTemplate)ticket_created- ForeignKey(Ticket, null=True)run_at- DateTimeField(auto_now_add=True)success- BooleanFielderror_message- TextField(blank=True)
Usage:
Audit trail for recurring ticket executions.