__author__ = '<EMAIL>'
# SQLLite DB Test Creation

from peewee import *


db = SqliteDatabase('test.db')


class Users(Model):
    ID = int()
    username = CharField()
    password = CharField()
    email = CharField()


class UserInfo(Model):
    ID = ForeignKeyField(Users, related_name='ID')
    NI = CharField()
    passport = CharField()


class Meta:
    database = db
    db._connect()
    db.create_tables([Users, UserInfo])

    user1 = Users(ID='1', password='<PASSWORD>', email='<EMAIL>')
    user2 = Users(ID='2', password='<PASSWORD>', email='<EMAIL>')
    user3 = Users(ID='3', password='<PASSWORD>', email='<EMAIL>')
    userinfo1 = UserInfo(NI='NI1', passport='passport1')
    userinfo2 = UserInfo(NI='NI2', passport='passport2')
    userinfo3 = UserInfo(NI='NI3', passport='passport3')
    user1.save()
    user2.save()
    user3.save()
    userinfo1.save()
    userinfo2.save()
    userinfo3.save()
__author__ = '<EMAIL>'
# SQLLite DB Test Creation

from peewee import *


db = SqliteDatabase('test.db')


class Users(Model):
    ID = int()
    username = CharField()
    password = CharField()
    email = CharField()


class UserInfo(Model):
    ID = ForeignKeyField(Users, related_name='ID')
    NI = CharField()
    passport = CharField()


class Meta:
    database = db
    db._connect()
    db.create_tables([Users, UserInfo])

    user1 = Users(ID='1', password='<PASSWORD>', email='<EMAIL>')
    user2 = Users(ID='2', password='<PASSWORD>', email='<EMAIL>')
    user3 = Users(ID='3', password='<PASSWORD>', email='<EMAIL>')
    userinfo1 = UserInfo(NI='NI1', passport='passport1')
    userinfo2 = UserInfo(NI='NI2', passport='passport2')
    userinfo3 = UserInfo(NI='NI3', passport='passport3')
    user1.save()
    user2.save()
    user3.save()
    userinfo1.save()
    userinfo2.save()
    userinfo3.save()
# SQLLite DB Test Creation