prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Add custom form for attendees
  **Is your feature request related to a problem? Please describe.**
  <!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
  
  Add custom form for attendees
  
  **Describe the solution you'd like**
  <!-- A clear and concise description of what you want to happen. -->
  
  **Describe alternatives you've considered**
  <!-- A clear and concise description of any alternative solutions or features you've considered. -->
  
  **Additional context**
  <!-- Add any other context or screenshots about the feature request here. -->
  
  **Working on it**
  
  </issue>
  <code>
  [start of app/models/custom_form.py]
  1 import json
  2 from sqlalchemy.schema import UniqueConstraint
  3 
  4 from app.models import db
  5 from app.models.base import SoftDeletionModel
  6 
  7 SESSION_FORM = {
  8     "title": {"include": 1, "require": 1},
  9     "subtitle": {"include": 0, "require": 0},
  10     "short_abstract": {"include": 1, "require": 0},
  11     "long_abstract": {"include": 0, "require": 0},
  12     "comments": {"include": 1, "require": 0},
  13     "track": {"include": 0, "require": 0},
  14     "session_type": {"include": 0, "require": 0},
  15     "language": {"include": 0, "require": 0},
  16     "slides": {"include": 1, "require": 0},
  17     "video": {"include": 0, "require": 0},
  18     "audio": {"include": 0, "require": 0}
  19 }
  20 
  21 SPEAKER_FORM = {
  22     "name": {"include": 1, "require": 1},
  23     "email": {"include": 1, "require": 1},
  24     "photo": {"include": 1, "require": 0},
  25     "organisation": {"include": 1, "require": 0},
  26     "position": {"include": 1, "require": 0},
  27     "country": {"include": 1, "require": 0},
  28     "short_biography": {"include": 1, "require": 0},
  29     "long_biography": {"include": 0, "require": 0},
  30     "mobile": {"include": 0, "require": 0},
  31     "website": {"include": 1, "require": 0},
  32     "facebook": {"include": 0, "require": 0},
  33     "twitter": {"include": 1, "require": 0},
  34     "github": {"include": 0, "require": 0},
  35     "linkedin": {"include": 0, "require": 0}
  36 }
  37 
  38 session_form_str = json.dumps(SESSION_FORM, separators=(',', ':'))
  39 speaker_form_str = json.dumps(SPEAKER_FORM, separators=(',', ':'))
  40 
  41 
  42 class CustomForms(SoftDeletionModel):
  43     """custom form model class"""
  44     __tablename__ = 'custom_forms'
  45     __table_args__ = (UniqueConstraint('event_id', 'field_identifier', 'form', name='custom_form_identifier'), )
  46     id = db.Column(db.Integer, primary_key=True)
  47     field_identifier = db.Column(db.String, nullable=False)
  48     form = db.Column(db.String, nullable=False)
  49     type = db.Column(db.String, nullable=False)
  50     is_required = db.Column(db.Boolean)
  51     is_included = db.Column(db.Boolean)
  52     is_fixed = db.Column(db.Boolean)
  53     event_id = db.Column(db.Integer, db.ForeignKey('events.id', ondelete='CASCADE'))
  54 
  55     def __init__(self,
  56                  event_id=None,
  57                  field_identifier=None,
  58                  form=None,
  59                  type=None,
  60                  is_required=None,
  61                  is_included=None,
  62                  is_fixed=None,
  63                  deleted_at=None):
  64         self.event_id = event_id
  65         self.field_identifier = field_identifier,
  66         self.form = form,
  67         self.type = type,
  68         self.is_required = is_required,
  69         self.is_included = is_included,
  70         self.is_fixed = is_fixed
  71         self.deleted_at = deleted_at
  72 
  73     def __repr__(self):
  74         return '<CustomForm %r>' % self.id
  75 
  76     def __str__(self):
  77         return self.__repr__()
  78 
  79     @property
  80     def serialize(self):
  81         """Return object data in easily serializable format"""
  82 
  83         return {
  84             'id': self.id,
  85             'field_identifier': self.field_identifier,
  86             'form': self.form,
  87             'type': self.type,
  88             'is_required': self.is_required,
  89             'is_included': self.is_included,
  90             'is_fixed': self.is_fixed
  91         }
  92
  [end of app/models/custom_form.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/app/models/custom_form.py b/app/models/custom_form.py
  --- a/app/models/custom_form.py
  +++ b/app/models/custom_form.py
  @@ -35,8 +35,34 @@
       "linkedin": {"include": 0, "require": 0}
   }
   
  +ATTENDEE_FORM = {
  +    "firstname": {"include": 1, "require": 1},
  +    "lastname": {"include": 1, "require": 1},
  +    "email": {"include": 1, "require": 0},
  +    "address": {"include": 1, "require": 0},
  +    "city": {"include": 1, "require": 0},
  +    "state": {"include": 1, "require": 0},
  +    "country": {"include": 1, "require": 0},
  +    "job_title": {"include": 1, "require": 0},
  +    "phone": {"include": 1, "require": 0},
  +    "tax_business_info": {"include": 0, "require": 0},
  +    "billing_address": {"include": 0, "require": 0},
  +    "home_address": {"include": 0, "require": 0},
  +    "shipping_address": {"include": 0, "require": 0},
  +    "company": {"include": 0, "require": 0},
  +    "work_address": {"include": 0, "require": 0},
  +    "work_phone": {"include": 0, "require": 0},
  +    "website": {"include": 1, "require": 0},
  +    "blog": {"include": 0, "require": 0},
  +    "twitter": {"include": 1, "require": 0},
  +    "facebook": {"include": 0, "require": 0},
  +    "github": {"include": 1, "require": 0},
  +    "gender": {"include": 0, "require": 0},
  +}
  +
   session_form_str = json.dumps(SESSION_FORM, separators=(',', ':'))
   speaker_form_str = json.dumps(SPEAKER_FORM, separators=(',', ':'))
  +attendee_form_str = json.dumps(ATTENDEE_FORM, separators=(',', ':'))
   
   
   class CustomForms(SoftDeletionModel):
  
verification_info: {"golden_diff": "diff --git a/app/models/custom_form.py b/app/models/custom_form.py\n--- a/app/models/custom_form.py\n+++ b/app/models/custom_form.py\n@@ -35,8 +35,34 @@\n     \"linkedin\": {\"include\": 0, \"require\": 0}\n }\n \n+ATTENDEE_FORM = {\n+    \"firstname\": {\"include\": 1, \"require\": 1},\n+    \"lastname\": {\"include\": 1, \"require\": 1},\n+    \"email\": {\"include\": 1, \"require\": 0},\n+    \"address\": {\"include\": 1, \"require\": 0},\n+    \"city\": {\"include\": 1, \"require\": 0},\n+    \"state\": {\"include\": 1, \"require\": 0},\n+    \"country\": {\"include\": 1, \"require\": 0},\n+    \"job_title\": {\"include\": 1, \"require\": 0},\n+    \"phone\": {\"include\": 1, \"require\": 0},\n+    \"tax_business_info\": {\"include\": 0, \"require\": 0},\n+    \"billing_address\": {\"include\": 0, \"require\": 0},\n+    \"home_address\": {\"include\": 0, \"require\": 0},\n+    \"shipping_address\": {\"include\": 0, \"require\": 0},\n+    \"company\": {\"include\": 0, \"require\": 0},\n+    \"work_address\": {\"include\": 0, \"require\": 0},\n+    \"work_phone\": {\"include\": 0, \"require\": 0},\n+    \"website\": {\"include\": 1, \"require\": 0},\n+    \"blog\": {\"include\": 0, \"require\": 0},\n+    \"twitter\": {\"include\": 1, \"require\": 0},\n+    \"facebook\": {\"include\": 0, \"require\": 0},\n+    \"github\": {\"include\": 1, \"require\": 0},\n+    \"gender\": {\"include\": 0, \"require\": 0},\n+}\n+\n session_form_str = json.dumps(SESSION_FORM, separators=(',', ':'))\n speaker_form_str = json.dumps(SPEAKER_FORM, separators=(',', ':'))\n+attendee_form_str = json.dumps(ATTENDEE_FORM, separators=(',', ':'))\n \n \n class CustomForms(SoftDeletionModel):\n", "issue": "Add custom form for attendees\n**Is your feature request related to a problem? Please describe.**\r\n<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->\r\n\r\nAdd custom form for attendees\r\n\r\n**Describe the solution you'd like**\r\n<!-- A clear and concise description of what you want to happen. -->\r\n\r\n**Describe alternatives you've considered**\r\n<!-- A clear and concise description of any alternative solutions or features you've considered. -->\r\n\r\n**Additional context**\r\n<!-- Add any other context or screenshots about the feature request here. -->\r\n\r\n**Working on it**\n", "before_files": [{"content": "import json\nfrom sqlalchemy.schema import UniqueConstraint\n\nfrom app.models import db\nfrom app.models.base import SoftDeletionModel\n\nSESSION_FORM = {\n    \"title\": {\"include\": 1, \"require\": 1},\n    \"subtitle\": {\"include\": 0, \"require\": 0},\n    \"short_abstract\": {\"include\": 1, \"require\": 0},\n    \"long_abstract\": {\"include\": 0, \"require\": 0},\n    \"comments\": {\"include\": 1, \"require\": 0},\n    \"track\": {\"include\": 0, \"require\": 0},\n    \"session_type\": {\"include\": 0, \"require\": 0},\n    \"language\": {\"include\": 0, \"require\": 0},\n    \"slides\": {\"include\": 1, \"require\": 0},\n    \"video\": {\"include\": 0, \"require\": 0},\n    \"audio\": {\"include\": 0, \"require\": 0}\n}\n\nSPEAKER_FORM = {\n    \"name\": {\"include\": 1, \"require\": 1},\n    \"email\": {\"include\": 1, \"require\": 1},\n    \"photo\": {\"include\": 1, \"require\": 0},\n    \"organisation\": {\"include\": 1, \"require\": 0},\n    \"position\": {\"include\": 1, \"require\": 0},\n    \"country\": {\"include\": 1, \"require\": 0},\n    \"short_biography\": {\"include\": 1, \"require\": 0},\n    \"long_biography\": {\"include\": 0, \"require\": 0},\n    \"mobile\": {\"include\": 0, \"require\": 0},\n    \"website\": {\"include\": 1, \"require\": 0},\n    \"facebook\": {\"include\": 0, \"require\": 0},\n    \"twitter\": {\"include\": 1, \"require\": 0},\n    \"github\": {\"include\": 0, \"require\": 0},\n    \"linkedin\": {\"include\": 0, \"require\": 0}\n}\n\nsession_form_str = json.dumps(SESSION_FORM, separators=(',', ':'))\nspeaker_form_str = json.dumps(SPEAKER_FORM, separators=(',', ':'))\n\n\nclass CustomForms(SoftDeletionModel):\n    \"\"\"custom form model class\"\"\"\n    __tablename__ = 'custom_forms'\n    __table_args__ = (UniqueConstraint('event_id', 'field_identifier', 'form', name='custom_form_identifier'), )\n    id = db.Column(db.Integer, primary_key=True)\n    field_identifier = db.Column(db.String, nullable=False)\n    form = db.Column(db.String, nullable=False)\n    type = db.Column(db.String, nullable=False)\n    is_required = db.Column(db.Boolean)\n    is_included = db.Column(db.Boolean)\n    is_fixed = db.Column(db.Boolean)\n    event_id = db.Column(db.Integer, db.ForeignKey('events.id', ondelete='CASCADE'))\n\n    def __init__(self,\n                 event_id=None,\n                 field_identifier=None,\n                 form=None,\n                 type=None,\n                 is_required=None,\n                 is_included=None,\n                 is_fixed=None,\n                 deleted_at=None):\n        self.event_id = event_id\n        self.field_identifier = field_identifier,\n        self.form = form,\n        self.type = type,\n        self.is_required = is_required,\n        self.is_included = is_included,\n        self.is_fixed = is_fixed\n        self.deleted_at = deleted_at\n\n    def __repr__(self):\n        return '<CustomForm %r>' % self.id\n\n    def __str__(self):\n        return self.__repr__()\n\n    @property\n    def serialize(self):\n        \"\"\"Return object data in easily serializable format\"\"\"\n\n        return {\n            'id': self.id,\n            'field_identifier': self.field_identifier,\n            'form': self.form,\n            'type': self.type,\n            'is_required': self.is_required,\n            'is_included': self.is_included,\n            'is_fixed': self.is_fixed\n        }\n", "path": "app/models/custom_form.py"}]}