prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Wrong event invoice status fields in db schema
  **Describe the bug**
  The values allowed for invoices are paid, due &incoming [schema choices]. They are currently equal to those of orders.
  
  
  
  </issue>
  <code>
  [start of app/api/schema/event_invoices.py]
  1 from marshmallow import validate as validate
  2 from marshmallow_jsonapi import fields
  3 from marshmallow_jsonapi.flask import Relationship
  4 
  5 from app.api.helpers.static import PAYMENT_COUNTRIES
  6 from app.api.helpers.utilities import dasherize
  7 from app.api.schema.base import SoftDeletionSchema
  8 from utils.common import use_defaults
  9 
  10 
  11 @use_defaults()
  12 class EventInvoiceSchema(SoftDeletionSchema):
  13     """
  14     Event Invoice API Schema based on event invoice model
  15     """
  16     class Meta:
  17         type_ = 'event-invoice'
  18         self_view = 'v1.event_invoice_detail'
  19         self_view_kwargs = {'id': '<id>'}
  20         inflect = dasherize
  21 
  22     id = fields.Str(dump_only=True)
  23     identifier = fields.Str(allow_none=True)
  24     amount = fields.Float(validate=lambda n: n >= 0, allow_none=True)
  25     address = fields.Str(allow_none=True)
  26     city = fields.Str(allow_none=True)
  27     state = fields.Str(allow_none=True)
  28     country = fields.Str(validate=validate.OneOf(choices=PAYMENT_COUNTRIES), allow_none=True)
  29     zipcode = fields.Str(allow_none=True)
  30     created_at = fields.DateTime(allow_none=True)
  31     completed_at = fields.DateTime(default=None)
  32     transaction_id = fields.Str(allow_none=True)
  33     paid_via = fields.Str(validate=validate.OneOf(
  34         choices=["free", "stripe", "paypal", "transfer", "onsite", "cheque"]), allow_none=True)
  35     payment_mode = fields.Str(allow_none=True)
  36     brand = fields.Str(allow_none=True)
  37     exp_month = fields.Integer(validate=lambda n: 0 <= n <= 12, allow_none=True)
  38     exp_year = fields.Integer(validate=lambda n: n >= 2015, allow_none=True)
  39     last4 = fields.Str(allow_none=True)
  40     stripe_token = fields.Str(allow_none=True)
  41     paypal_token = fields.Str(allow_none=True)
  42     status = fields.Str(validate=validate.OneOf(
  43         choices=["expired", "deleted", "initialized" "completed", "placed", "pending", "cancelled"]), allow_none=True)
  44     invoice_pdf_url = fields.Url(allow_none=True)
  45     user = Relationship(attribute='user',
  46                         self_view='v1.event_invoice_user',
  47                         self_view_kwargs={'id': '<id>'},
  48                         related_view='v1.user_detail',
  49                         related_view_kwargs={'event_invoice_id': '<id>'},
  50                         schema='UserSchemaPublic',
  51                         type_='user')
  52     order = Relationship(attribute='order',
  53                          self_view='v1.event_invoice_order',
  54                          self_view_kwargs={'id': '<id>'},
  55                          related_view='v1.order_detail',
  56                          related_view_kwargs={'id': '<id>'},
  57                          schema='OrderSchema',
  58                          type_='order')
  59     event = Relationship(attribute='event',
  60                          self_view='v1.event_invoice_event',
  61                          self_view_kwargs={'id': '<id>'},
  62                          related_view='v1.event_detail',
  63                          related_view_kwargs={'event_invoice_id': '<id>'},
  64                          schema='EventSchemaPublic',
  65                          type_='event')
  66     discount_code = Relationship(attribute='discount_code',
  67                                  self_view='v1.event_invoice_discount_code',
  68                                  self_view_kwargs={'id': '<id>'},
  69                                  related_view='v1.discount_code_detail',
  70                                  related_view_kwargs={'event_invoice_id': '<id>'},
  71                                  schema='DiscountCodeSchemaPublic',
  72                                  type_='discount-code')
  73
  [end of app/api/schema/event_invoices.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/api/schema/event_invoices.py b/app/api/schema/event_invoices.py
  --- a/app/api/schema/event_invoices.py
  +++ b/app/api/schema/event_invoices.py
  @@ -39,8 +39,7 @@
       last4 = fields.Str(allow_none=True)
       stripe_token = fields.Str(allow_none=True)
       paypal_token = fields.Str(allow_none=True)
  -    status = fields.Str(validate=validate.OneOf(
  -        choices=["expired", "deleted", "initialized" "completed", "placed", "pending", "cancelled"]), allow_none=True)
  +    status = fields.Str(validate=validate.OneOf(choices=["paid", "due"]), allow_none=True)
       invoice_pdf_url = fields.Url(allow_none=True)
       user = Relationship(attribute='user',
                           self_view='v1.event_invoice_user',
  
verification_info: {"golden_diff": "diff --git a/app/api/schema/event_invoices.py b/app/api/schema/event_invoices.py\n--- a/app/api/schema/event_invoices.py\n+++ b/app/api/schema/event_invoices.py\n@@ -39,8 +39,7 @@\n     last4 = fields.Str(allow_none=True)\n     stripe_token = fields.Str(allow_none=True)\n     paypal_token = fields.Str(allow_none=True)\n-    status = fields.Str(validate=validate.OneOf(\n-        choices=[\"expired\", \"deleted\", \"initialized\" \"completed\", \"placed\", \"pending\", \"cancelled\"]), allow_none=True)\n+    status = fields.Str(validate=validate.OneOf(choices=[\"paid\", \"due\"]), allow_none=True)\n     invoice_pdf_url = fields.Url(allow_none=True)\n     user = Relationship(attribute='user',\n                         self_view='v1.event_invoice_user',\n", "issue": "Wrong event invoice status fields in db schema\n**Describe the bug**\r\nThe values allowed for invoices are paid, due &incoming [schema choices]. They are currently equal to those of orders.\r\n\r\n\n", "before_files": [{"content": "from marshmallow import validate as validate\nfrom marshmallow_jsonapi import fields\nfrom marshmallow_jsonapi.flask import Relationship\n\nfrom app.api.helpers.static import PAYMENT_COUNTRIES\nfrom app.api.helpers.utilities import dasherize\nfrom app.api.schema.base import SoftDeletionSchema\nfrom utils.common import use_defaults\n\n\n@use_defaults()\nclass EventInvoiceSchema(SoftDeletionSchema):\n    \"\"\"\n    Event Invoice API Schema based on event invoice model\n    \"\"\"\n    class Meta:\n        type_ = 'event-invoice'\n        self_view = 'v1.event_invoice_detail'\n        self_view_kwargs = {'id': '<id>'}\n        inflect = dasherize\n\n    id = fields.Str(dump_only=True)\n    identifier = fields.Str(allow_none=True)\n    amount = fields.Float(validate=lambda n: n >= 0, allow_none=True)\n    address = fields.Str(allow_none=True)\n    city = fields.Str(allow_none=True)\n    state = fields.Str(allow_none=True)\n    country = fields.Str(validate=validate.OneOf(choices=PAYMENT_COUNTRIES), allow_none=True)\n    zipcode = fields.Str(allow_none=True)\n    created_at = fields.DateTime(allow_none=True)\n    completed_at = fields.DateTime(default=None)\n    transaction_id = fields.Str(allow_none=True)\n    paid_via = fields.Str(validate=validate.OneOf(\n        choices=[\"free\", \"stripe\", \"paypal\", \"transfer\", \"onsite\", \"cheque\"]), allow_none=True)\n    payment_mode = fields.Str(allow_none=True)\n    brand = fields.Str(allow_none=True)\n    exp_month = fields.Integer(validate=lambda n: 0 <= n <= 12, allow_none=True)\n    exp_year = fields.Integer(validate=lambda n: n >= 2015, allow_none=True)\n    last4 = fields.Str(allow_none=True)\n    stripe_token = fields.Str(allow_none=True)\n    paypal_token = fields.Str(allow_none=True)\n    status = fields.Str(validate=validate.OneOf(\n        choices=[\"expired\", \"deleted\", \"initialized\" \"completed\", \"placed\", \"pending\", \"cancelled\"]), allow_none=True)\n    invoice_pdf_url = fields.Url(allow_none=True)\n    user = Relationship(attribute='user',\n                        self_view='v1.event_invoice_user',\n                        self_view_kwargs={'id': '<id>'},\n                        related_view='v1.user_detail',\n                        related_view_kwargs={'event_invoice_id': '<id>'},\n                        schema='UserSchemaPublic',\n                        type_='user')\n    order = Relationship(attribute='order',\n                         self_view='v1.event_invoice_order',\n                         self_view_kwargs={'id': '<id>'},\n                         related_view='v1.order_detail',\n                         related_view_kwargs={'id': '<id>'},\n                         schema='OrderSchema',\n                         type_='order')\n    event = Relationship(attribute='event',\n                         self_view='v1.event_invoice_event',\n                         self_view_kwargs={'id': '<id>'},\n                         related_view='v1.event_detail',\n                         related_view_kwargs={'event_invoice_id': '<id>'},\n                         schema='EventSchemaPublic',\n                         type_='event')\n    discount_code = Relationship(attribute='discount_code',\n                                 self_view='v1.event_invoice_discount_code',\n                                 self_view_kwargs={'id': '<id>'},\n                                 related_view='v1.discount_code_detail',\n                                 related_view_kwargs={'event_invoice_id': '<id>'},\n                                 schema='DiscountCodeSchemaPublic',\n                                 type_='discount-code')\n", "path": "app/api/schema/event_invoices.py"}]}