Let's say I have many models that all use the same type of column. e.g.
class PurchaseOrder(Model):
unitprice = Column(Numeric(10,2))
...other columns
class SalesOrder(Model):
salesprice = Column(Numeric(10,2))
...other columns
I would like to define some variable like;
currencyamount = Column(Numeric(10,2))
Then, if the definition ever changes I would only have one place to fix it. I would expect the model definition to look something like this now.
class PurchaseOrder(Model):
unitprice = currencyamount
...other columns
If I try this I get an error along the lines of "Column object 'unitprice' already assigned to Table PurchaseOrder."
How can I go about doing this?