コード例 #1
0
class Development(BaseModel):
    __tablename__ = 'developments'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    position = db.Column(db.Integer)
    answer = db.Column(db.Integer)
    month = db.Column(db.Integer)
    point_b = db.Column(db.Integer)
    point_gh = db.Column(db.Integer)
    point_gk = db.Column(db.Integer)
    point_p = db.Column(db.Integer)
    point_s = db.Column(db.Integer)
    question_b = db.Column(db.String)
    question_gh = db.Column(db.String)
    question_gk = db.Column(db.String)
    question_p = db.Column(db.String)
    question_s = db.Column(db.String)
    stimulation_b = db.Column(db.String)
    stimulation_gh = db.Column(db.String)
    stimulation_gk = db.Column(db.String)
    stimulation_p = db.Column(db.String)
    stimulation_s = db.Column(db.String)
    flag = db.Column(db.Boolean)
    village = db.Column(db.String)

    fk_child_id = db.Column(db.Integer, db.ForeignKey('childs.id'))
    child = db.relationship('Child', lazy='joined')
コード例 #2
0
ファイル: vaccine.py プロジェクト: vickazy/sideka_app_server
class Vaccine(BaseModel):
    __tablename__ = 'vaccines'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    name = db.Column(db.String)
    flag = db.Column(db.Boolean)
    village = db.Column(db.String)
    fk_growth_id = db.Column(db.Integer)
    fk_child_id = db.Column(db.Integer, db.ForeignKey('childs.id'))
    child = db.relationship('Child', lazy='joined')
コード例 #3
0
ファイル: growth.py プロジェクト: vickazy/sideka_app_server
class Growth(BaseModel):
    __tablename__ = 'growths'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    month = db.Column(db.Integer)
    weight = db.Column(db.DECIMAL)
    height = db.Column(db.Integer)
    is_breast_feeding = db.Column(db.Boolean)
    vaccine = db.Column(db.String)
    flag = db.Column(db.Boolean)
    village = db.Column(db.String)

    fk_child_id = db.Column(db.Integer, db.ForeignKey('childs.id'))
    child = db.relationship('Child', lazy='joined')
コード例 #4
0
class Child(BaseModel):
    __tablename__ = 'childs'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    name = db.Column(db.String, nullable=False)
    birth_date = db.Column(db.Date)
    gender = db.Column(db.String)
    bpjs = db.Column(db.String)
    bpjs_id = db.Column(db.String)
    flag = db.Column(db.Boolean)
    village = db.Column(db.String)

    fk_parent_id = db.Column(db.Integer, db.ForeignKey('parents.id'))
    parent = db.relationship('Parent', lazy='joined')
コード例 #5
0
ファイル: parent.py プロジェクト: vickazy/sideka_app_server
class Parent(BaseModel):
    __tablename__ = 'parents'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True)
    name = db.Column(db.String, nullable=False)
    nik = db.Column(db.String)
    phone = db.Column(db.String)
    job = db.Column(db.String)
    birth_date = db.Column(db.Date)
    family_planning_date = db.Column(db.Date)
    family_planning_range = db.Column(db.String)
    flag = db.Column(db.Boolean)
    village = db.Column(db.String)

    fk_user_id = db.Column(db.Integer, db.ForeignKey('users.id'))
    user = db.relationship('User', lazy='joined')