Omkar008 commited on
Commit
b0f69e6
1 Parent(s): f6cb9db

Update models/models.py

Browse files
Files changed (1) hide show
  1. models/models.py +4 -2
models/models.py CHANGED
@@ -8,12 +8,13 @@ class Attachment:
8
 
9
 
10
  class Message:
11
- def __init__(self, message_id: str, body: Optional[str], attachments: Optional[List[Attachment]], company: str , document_len:int):
12
  self.id = message_id
13
  self.body = body
14
  self.attachments = attachments
15
  self.company = company
16
  self.document_len = document_len
 
17
 
18
  def to_json(self):
19
  return {
@@ -21,5 +22,6 @@ class Message:
21
  "body": self.body,
22
  "attachments": [attachment.__dict__ for attachment in self.attachments] if self.attachments else None,
23
  "company": self.company,
24
- "document_len" : self.document_len
 
25
  }
 
8
 
9
 
10
  class Message:
11
+ def __init__(self, message_id: str, body: Optional[str], attachments: Optional[List[Attachment]], company: str , body_len:int , attachemnt_len:int):
12
  self.id = message_id
13
  self.body = body
14
  self.attachments = attachments
15
  self.company = company
16
  self.document_len = document_len
17
+ self.attachemnt_len = attachemnt_len
18
 
19
  def to_json(self):
20
  return {
 
22
  "body": self.body,
23
  "attachments": [attachment.__dict__ for attachment in self.attachments] if self.attachments else None,
24
  "company": self.company,
25
+ "document_len" : self.document_len,
26
+ "attachemnt_len" : attachemnt_len
27
  }