#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @File     : test_dao
# @Author   : LiuYan
# @Time     : 2021/12/1 11:51

from dao.test.role import Role
from dao.test.user import User
from base.dao.base_dao import db

if __name__ == '__main__':
    """
    一对多表 创建 增删改查
    """
    # create
    db.create_all()

    # add
    new_user = User(name='liuyan')
    db.session.add(new_user)
    db.session.commit()
    list_user = User.query.all()
    print(list_user)
