class DocumentRequestItem(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) reference_no = models.CharField(max_length=100, null=True, blank=True) DOCUMENT_STATUS = [ ('PD', 'Pending'), ('AP', 'Approve') ] document_status = models.CharField(max_length=2, choices=DOCUMENT_STATUS, default='PD') DOCUMENT_TYPE = [ ('FR', 'Form'), ('PF', 'Profile') ] document_type = models.CharField(max_length=2, choices=DOCUMENT_TYPE, default='FR') document_request = models.ForeignKey(DocumentRequest, on_delete=models.CASCADE, null=True, related_name='document_request_item') document_name = models.CharField(max_length=100, blank=True, null=True) image_form_type = models.CharField(max_length=100, blank=True, null=True) image_version_id = models.CharField(max_length=100, blank=True, null=True) entity = models.ForeignKey(Entity, on_delete=models.CASCADE, null=True) generated_profile = models.FileField(null=True, upload_to=PathAndRename('document-request-item-profile')) approver = models.ForeignKey(CustomUser, on_delete=models.CASCADE, null=True, related_name='document_request_approver') approved_date = models.DateTimeField(null=True) created_date = models.DateTimeField(auto_now_add=True) modified_date = models.DateTimeField(auto_now=True) class meta: ordering = ['-created_date']
class Transaction(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) total_amount = models.IntegerField(null=True) PAYMENT_STATUS = [ ('OK', 'Successful'), ('FL', 'Failed'), ('PD', 'Pending'), ('NA', 'Not Available') ] transaction_type = models.CharField(max_length=255, blank=True, null=True) transaction_message = models.CharField(max_length=255, blank=True, null=True) card_holder = models.CharField(max_length=255, blank=True, null=True) card_no_mask = models.CharField(max_length=255, blank=True, null=True) payment_status = models.CharField(choices=PAYMENT_STATUS, max_length=2, default='PD') payment_gateway_update_date = models.DateTimeField(null=True) PAYMENT_METHOD = [ ('CC', 'Credit Card'), ('DD', 'Direct Debit'), ('WA', 'e-Wallet'), ('NA', 'Not Available') ] payment_method = models.CharField(choices=PAYMENT_METHOD, max_length=2, null=True) name = models.CharField(max_length=512, null=True) organisation = models.CharField(max_length=512, null=True) address1 = models.CharField(max_length=512, null=True) address2 = models.CharField(max_length=512, null=True) address3 = models.CharField(max_length=512, null=True) postcode = models.CharField(max_length=512, null=True) state = models.CharField(max_length=512, null=True) city = models.CharField(max_length=512, null=True) country = models.CharField(max_length=512, null=True) email_address = models.CharField(max_length=512, null=True) phone_number = models.CharField(max_length=512, null=True) reference = models.CharField(max_length=512, null=True) cart = models.ForeignKey(Cart, on_delete=models.CASCADE, null=True) payment_gateway_order_id = models.IntegerField(default=0) user = models.ForeignKey(CustomUser, on_delete=models.CASCADE, null=True) reference_no = models.CharField(max_length=512, null=True) transaction_id = models.CharField(max_length=512, null=True) receipt_no = models.CharField(max_length=512, null=True) receipt = models.FileField(null=True, upload_to=PathAndRename('transaction-receipt')) created_date = models.DateTimeField(auto_now_add=True) modified_date = models.DateTimeField(auto_now=True) class Meta: ordering = ['-payment_gateway_update_date']
class EnquiryMedia(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) name = models.CharField(max_length=100, null=True, blank=True) ticket = models.ForeignKey(Ticket, on_delete=models.CASCADE, null=True, related_name='ticket_attachments') attached_document = models.FileField( null=True, upload_to=PathAndRename('enquiry-attached-document'))
class DocumentRequest(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) reference_no = models.CharField(max_length=100, null=True, blank=True) reference_letter_no = models.CharField(max_length=100, null=True) ip_no = models.CharField(max_length=100, null=True) court_case_no = models.CharField(max_length=100, null=True) official_letter_request = models.FileField(null=True, upload_to=PathAndRename('document-request-official-letter-request')) official_letter_egov = models.FileField(null=True, upload_to=PathAndRename('document-request-official-letter-egov')) offence = models.TextField(null=True) user = models.ForeignKey(CustomUser, on_delete=models.CASCADE, null=True) created_date = models.DateTimeField(auto_now_add=True) modified_date = models.DateTimeField(auto_now=True) class meta: ordering = ['-created_date']
class EgovernmentRequest(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) user = models.ForeignKey(CustomUser, on_delete=models.CASCADE, null=True) approver = models.ForeignKey(CustomUser, on_delete=models.CASCADE, null=True, related_name='egov_request_approver') reference_no = models.CharField(max_length=100, null=True, blank=True) REQUEST_TYPE = [ ('RG', 'Registration'), ('QU', 'Quota Request'), ('RN', 'Renew Account'), ('UI', 'Update Information') ] request_type = models.CharField(choices=REQUEST_TYPE, max_length=2, default='RG') REQUEST_STATUS = [ ('NA', 'NA'), ('AP', 'Approved'), ('PD', 'Pending'), ('RJ', 'Rejected') ] request_status = models.CharField(choices=REQUEST_STATUS, max_length=2, default='PD') egov_package = models.IntegerField(default=0, null=False) egov_quota = models.IntegerField(default=0, null=True) position_or_grade = models.CharField(max_length=100, blank=True, null=True) phone_number = models.CharField(max_length=14, blank=True, null=True) head_of_department_name = models.CharField(max_length=100, blank=True, null=True) head_of_department_position = models.CharField(max_length=100, blank=True, null=True) head_of_department_email = models.EmailField(max_length=100, blank=True, null=True) ministry_name = models.CharField(max_length=100, blank=True, null=True) department_name = models.CharField(max_length=100, blank=True, null=True) division_name = models.CharField(max_length=100, blank=True, null=True) address_1 = models.CharField(max_length=100, blank=True, null=True) address_2 = models.CharField(max_length=100, blank=True, null=True) address_3 = models.CharField(max_length=100, blank=True, null=True) city = models.CharField(max_length=100, blank=True, null=True) postcode = models.CharField(max_length=100, blank=True, null=True) state = models.CharField(max_length=100, blank=True, null=True) attachment_letter = models.FileField(null=True, upload_to=PathAndRename('egovernment-request-attachment-letter')) expired_date = models.DateTimeField(null=True, blank=True) remarks = models.TextField(null=True, blank=True) created_date = models.DateTimeField(auto_now_add=True) modified_date = models.DateTimeField(auto_now=True) class meta: ordering = ['created_date']
class TicketInvestigation(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) officer = models.ForeignKey(CustomUser, on_delete=models.CASCADE) reference_letter_number = models.CharField(max_length=100, default='NA') ip_no = models.CharField(max_length=100, default='NA') court_case_number = models.CharField(max_length=100, default='NA') official_attachment = models.FileField( null=True, upload_to=PathAndRename('investigation-attachment-official')) offense = models.CharField(max_length=100, default='NA') document_request = models.FileField( null=True, upload_to=PathAndRename('investigation-document-request')) submit_request = models.FileField( null=True, upload_to=PathAndRename('investigation-submit-request')) created_date = models.DateTimeField(auto_now_add=True) modified_date = models.DateTimeField(auto_now=True) class meta: ordering = ['requestor'] def __str__(self): return self.entity_type
class Media(models.Model): id = models.AutoField(primary_key=True, editable=False) filename = models.CharField(max_length=100, null=True) file_extension = models.CharField(max_length=10, null=True) attachment = models.FileField(null=True, upload_to=PathAndRename('medias')) created_at = models.DateTimeField(auto_now_add=True) modified_at = models.DateTimeField(auto_now=True) class meta: ordering = ['filename'] def __str__(self): return ('%s.%s' % (self.filename, self.file_extension))