Skip to content

Commit 793c92e

Browse files
committed
Add other_identifier to bill result
1 parent 148faa2 commit 793c92e

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

api/db/models/bills.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ class BillIdentifier(BillRelatedBase, Base):
9696
__tablename__ = "opencivicdata_billidentifier"
9797

9898
identifier = Column(String)
99+
bill_id = Column(String, ForeignKey(Bill.id))
99100

100101

101102
class BillAction(BillRelatedBase, Base):

api/schemas.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ class Config:
146146
orm_mode = True
147147

148148

149+
class BillIdentifier(BaseModel):
150+
identifier: str = Field(..., example="ocd-bill-mn-2025_2026-sf827")
151+
152+
class Config:
153+
orm_mode = True
154+
155+
149156
class CompactJurisdiction(BaseModel):
150157
id: str = Field(..., example="ocd-jurisdiction/country:us/state:nc/government")
151158
name: str = Field(..., example="North Carolina")
@@ -170,6 +177,7 @@ class CompactBill(BaseModel):
170177
session: str
171178
identifier: str
172179
title: str
180+
other_identifiers: Optional[List[BillIdentifier]]
173181

174182
class Config:
175183
orm_mode = True
@@ -238,13 +246,6 @@ class Config:
238246
orm_mode = True
239247

240248

241-
class BillIdentifier(BaseModel):
242-
identifier: str = Field(..., example="HB 74")
243-
244-
class Config:
245-
orm_mode = True
246-
247-
248249
class BillSponsorship(BaseModel):
249250
id: UUID = Field(..., example="f0049138-1ad8-4506-a2a4-f4dd1251bbba")
250251
name: str = Field(..., example="JONES")

0 commit comments

Comments
 (0)