add locale model

This commit is contained in:
Martin
2016-04-26 12:07:48 +02:00
parent 953dffd1d3
commit bb251ec731
+13
View File
@@ -0,0 +1,13 @@
from api import db
class Locale(db.Model):
__tablename__ = 'locales'
id = db.Column(db.Integer, primary_key=True)
value = db.Column(db.String(5), nullable=False)
def to_json(self):
return {
"id": self.id
"value": self.value
}