Skip to content

Instantly share code, notes, and snippets.

@nguyenkims
Created January 27, 2016 13:10
Show Gist options
  • Save nguyenkims/403e5986e4fa8121a63a to your computer and use it in GitHub Desktop.
Save nguyenkims/403e5986e4fa8121a63a to your computer and use it in GitHub Desktop.
class Animal(db.Model):
__abstract__ = True
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(100))
class Cat(Animal):
__tablename__ = "cat"
meo = db.Column(db.String(10))
class Dog(Animal):
__tablename__ = "dog"
cho = db.Column(db.String(10))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment