Initial release
This commit is contained in:
commit
df93e6b87d
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
17
dm.py
Normal file
17
dm.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import sys, json, locale
|
||||
reload(sys)
|
||||
sys.setdefaultencoding('UTF-8')
|
||||
sys.setdefaultencoding(locale.getpreferredencoding())
|
||||
#locale.setlocale(locale.LC_ALL, 'ru_RU.UTF-8')
|
||||
|
||||
table_list = open("tables.json", "r")
|
||||
data = json.load(table_list)
|
||||
|
||||
tDescr = data["tables"][0]["tableDescription"]
|
||||
tName = data["tables"][0]["tableName"]
|
||||
fList = data["tables"][0]["fList"]
|
||||
print(tName)
|
||||
print(tDescr)
|
||||
print(fList)
|
||||
|
93
tables.json
Normal file
93
tables.json
Normal file
|
@ -0,0 +1,93 @@
|
|||
{
|
||||
"tables": [
|
||||
{
|
||||
"tableName": "users",
|
||||
"tableDescription": "Список пользователей",
|
||||
"fList": [
|
||||
{
|
||||
"fName": "id",
|
||||
"fDescr": "Номер п.п.",
|
||||
"fType": "int(6)",
|
||||
"index": "PRIMARY KEY",
|
||||
"autoIncrement": "yes"
|
||||
},
|
||||
{
|
||||
"fName": "username",
|
||||
"fDescr": "Логин",
|
||||
"fType": "char(20)",
|
||||
"index": "yes",
|
||||
"autoIncrement": "no"
|
||||
},
|
||||
{
|
||||
"fName": "password",
|
||||
"fDescr": "Пароль",
|
||||
"fType": "char(20)",
|
||||
"index": "no",
|
||||
"autoIncrement": "no"
|
||||
},
|
||||
{
|
||||
"fName": "lastname",
|
||||
"fDescr": "Фамилия",
|
||||
"fType": "char(20)",
|
||||
"index": "no",
|
||||
"autoIncrement": "no"
|
||||
},
|
||||
{
|
||||
"fName": "name",
|
||||
"fDescr": "Имя",
|
||||
"fType": "char(20)",
|
||||
"index": "no",
|
||||
"autoIncrement": "no"
|
||||
},
|
||||
{
|
||||
"fName": "middlename",
|
||||
"fDescr": "Отчество",
|
||||
"fType": "char(20)",
|
||||
"index": "no",
|
||||
"autoIncr": "no"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"tableName": "docs",
|
||||
"tableDescription": "Список документов",
|
||||
"fList": [
|
||||
{
|
||||
"fName": "id",
|
||||
"fDescr": "Номер п.п.",
|
||||
"fType": "int(6)",
|
||||
"index": "PRIMARY KEY",
|
||||
"autoIncrement": "yes"
|
||||
},
|
||||
{
|
||||
"fName": "docname",
|
||||
"fDescr": "Наименование",
|
||||
"fType": "varchar(100)",
|
||||
"index": "yes",
|
||||
"autoIncrement": "no"
|
||||
},
|
||||
{
|
||||
"fName": "description",
|
||||
"fDescr": "Описание",
|
||||
"fType": "varchar(200)",
|
||||
"index": "no",
|
||||
"autoIncrement": "no"
|
||||
},
|
||||
{
|
||||
"fName": "user_id",
|
||||
"fDescr": "Владелец",
|
||||
"fType": "int(6)",
|
||||
"index": "no",
|
||||
"autoIncrement": "no"
|
||||
},
|
||||
{
|
||||
"fName": "parent_id",
|
||||
"fDescr": "Имя",
|
||||
"fType": "int(6)",
|
||||
"index": "no",
|
||||
"autoIncrement": "no"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user