Use ORM for applicants
This commit is contained in:
14
lib/domain/Country.py
Normal file
14
lib/domain/Country.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from peewee import AutoField, CharField
|
||||
|
||||
from lib.domain.BaseModel import BaseModel
|
||||
|
||||
|
||||
class Country(BaseModel):
|
||||
class Meta:
|
||||
table_name = "country"
|
||||
id = AutoField(column_name="countryid")
|
||||
name = CharField(max_length=200, unique=True)
|
||||
name_short = CharField(max_length=100, column_name="countryshort")
|
||||
nationality = CharField(max_length=100)
|
||||
iso2 = CharField(max_length=2, unique=True)
|
||||
iso3 = CharField(max_length=3, unique=True)
|
||||
Reference in New Issue
Block a user