class OrderTicket(object):
    def __init__(
            self,
            service_category,
            driverSearchEngine,
            comment,
            arrivalTime,
            additionalServices,
            tasks,
            spendingLimit,
            isWithPaymentDocument,
            id,
            isProceedBeforeArrival
    ):
        self.service_category = service_category
        self.driverSearchEngine = driverSearchEngine
        self.comment = comment
        self.arrivalTime = arrivalTime
        self.additionalServices = additionalServices
        self.tasks = tasks
        self.spendingLimit = spendingLimit
        self.isWithPaymentDocument = isWithPaymentDocument
        self.id = id
        self.isProceedBeforeArrival = isProceedBeforeArrival


# ticket json example
'''
{
        "id": 2,
        "status": 111,
        "created_date": "2023-05-15",
        "status_changed_date": "2023-05-15T17:16:22.955601Z",
        "priority": 0,
        "title": "Test",
        "note": "{\n    \n    \"ticket\": 1,\n    \"state\": 1,\n    \"id_metaservice\": 1,\n    \"is_global\": false,\n    \"is_visible\": false,\n    \"service\": 1,\n    \"service_category\": 1,\n\n    \"time_placed\": 1}"
        "due_date": "2023-05-15",
        "task_list": 10,
        "created_by": 1,
        "type": 1,
        "assigned_to": 1
}
'''

# ticket minimal example
'''
{
        "id": 2,
        "status": 111,
        "created_date": "2023-05-15",
        "status_changed_date": "2023-05-15T17:16:22.955601Z",
        "priority": 0,
        "title": null,
        "note": null,
        "due_date": null,
        "task_list": 10,
        "created_by": 1,
        "type": 1,
        "assigned_to": null
}
{
  "service_category": 2,
  "driverSearchEngine": 0,
  "comment": "Yyyy",
  "arrivalTime": "2023-12-07T14:39:54Z",
  "additionalServices": [],
  "tasks": [
    {
      "text": "Eeee",
      "address": "Jjjj"
    }
  ],
  "spendingLimit": 6668,
  "isWithPaymentDocument": true,
  "id": 294830,
  "isProceedBeforeArrival": true
}

'''

# class OrderTicketOLD(object):
#     def __init__(self, id, status, created_date, status_changed_date, priority, title=None, note=None, due_date=None, task_list=None, created_by=None, type=None, assigned_to=None):
#         self.id = id
#         self.status = status
#         self.created_date = created_date
#         self.status_changed_date = status_changed_date
#         self.priority = priority
#         self.title = title
#         self.note = note
#         self.due_date = due_date
#         self.task_list = task_list
#         self.created_by = created_by
#         self.type = type
#         self.assigned_to = assigned_to

#     def  __str__(self):
#         return "{0}, {1}, {2}, {3}, {4}, {5}, {6},\n{7}, {8}, {9}, {10}, {11}\n".format(self.id, self.status, self.created_date, self.status_changed_date, self.priority, self.title, self.note, self.due_date, self.task_list, self.created_by, self.type, self.assigned_to)
