fix: change project struct

This commit is contained in:
Zhaolong
2022-01-25 22:57:24 +08:00
parent 3be9b86fff
commit da9965e2ae
10 changed files with 166 additions and 19 deletions

1
model/__init__.py Normal file
View File

@@ -0,0 +1 @@
from .person import Person

11
model/person.py Normal file
View File

@@ -0,0 +1,11 @@
from base import db
class Person(db.Model):
__tablename__ = 'faker_person'
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
name = db.Column(db.String(10), nullable=False)
sex = db.Column(db.SMALLINT, nullable=False)
age = db.Column(db.Integer, nullable=False)
address = db.Column(db.String(20), nullable=False)
identification = db.Column(db.String(18), nullable=False)