data-manipulation/db_template/dm.json

265 lines
6.8 KiB
JSON
Raw Normal View History

{
"tables": [
{
"tableName": "users",
"tableDescription": "Пользователи",
"fieldList": [
{
"fName": "id",
2019-04-12 16:36:18 +03:00
"fDescription": "UID",
2018-11-10 14:53:46 +03:00
"fType": "INTEGER",
"index": "PRIMARY KEY",
"autoIncrement": "yes",
"relation": []
},
{
"fName": "login",
"fDescription": "Логин",
"fType": "char(20)",
"index": "yes",
"autoIncrement": "no",
"relation": []
},
{
"fName": "password",
"fDescription": "Пароль",
"fType": "char(20)",
"index": "no",
"autoIncrement": "no",
"relation": []
},
{
"fName": "last_name",
"fDescription": "Фамилия",
"fType": "char(20)",
"index": "no",
"autoIncrement": "no",
"relation": []
},
{
"fName": "name",
"fDescription": "Имя",
"fType": "char(20)",
"index": "no",
"autoIncrement": "no",
"relation": []
},
{
"fName": "middle_name",
"fDescription": "Отчество",
"fType": "char(20)",
"index": "no",
"autoIncrement": "no",
"relation": []
}
]
},
{
"tableName": "docs",
"tableDescription": "Документы",
"fieldList": [
{
"fName": "id",
2019-04-12 16:36:18 +03:00
"fDescription": "UID",
"fType": "INTEGER",
"index": "PRIMARY KEY",
"autoIncrement": "yes",
"relation": []
},
{
"fName": "doc_name",
"fDescription": "Наименование",
"fType": "varchar(100)",
"index": "yes",
"autoIncrement": "no",
"relation": []
},
{
"fName": "description",
"fDescription": "Описание",
"fType": "varchar(200)",
"index": "no",
"autoIncrement": "no",
"relation": []
},
{
"fName": "users_id",
"fDescription": "Владелец",
"fType": "INTEGER",
"index": "no",
"autoIncrement": "no",
"relation": ["users.id", "last_name, name, middle_name"]
},
{
"fName": "parent_id",
"fDescription": "Родительский документ",
"fType": "INTEGER",
"index": "no",
"autoIncrement": "no",
"relation": ["docs.id", "doc_name"]
}
]
},
{
"tableName": "address",
"tableDescription": "Адреса",
"fieldList": [
{
"fName": "id",
2019-04-12 16:36:18 +03:00
"fDescription": "UID",
"fType": "INTEGER",
"index": "PRIMARY KEY",
"autoIncrement": "yes",
"relation": []
},
{
"fName": "region",
"fDescription": "Регион",
"fType": "varchar(100)",
"index": "yes",
"autoIncrement": "no",
"relation": []
},
{
"fName": "city",
2019-04-12 16:36:18 +03:00
"fDescription": "Населенный пункт",
"fType": "varchar(200)",
"index": "no",
"autoIncrement": "no",
"relation": []
},
{
"fName": "street",
"fDescription": "Улица",
"fType": "varchar(100)",
"index": "no",
"autoIncrement": "no",
"relation": []
},
{
"fName": "house",
"fDescription": "Дом",
"fType": "char(6)",
"index": "no",
"autoIncrement": "no",
"relation": []
}
]
},
{
2019-04-12 16:36:18 +03:00
"tableName": "items",
"tableDescription": "Оборудование",
"fieldList": [
{
"fName": "id",
2019-04-12 16:36:18 +03:00
"fDescription": "UID",
"fType": "INTEGER",
"index": "PRIMARY KEY",
"autoIncrement": "yes",
"relation": []
},
{
2019-04-12 16:36:18 +03:00
"fName": "item_name",
"fDescription": "Наименование",
"fType": "VARCHAR(100)",
"index": "no",
"autoIncrement": "no",
"relation": []
},
{
"fName": "item_address",
"fDescription": "Место расположения",
2018-11-10 14:53:46 +03:00
"fType": "INTEGER",
"index": "no",
"autoIncrement": "no",
2019-04-12 16:36:18 +03:00
"relation": ["address.id", "city, street, house"]
},
{
"fName": "item_type",
"fDescription": "Тип",
"fType": "CHAR(20)",
"index": "no",
"autoIncrement": "no",
"relation": ["itemtype.id", "type_name"]
},
{
"fName": "inventory_number",
"fDescription": "Инвентарный номер",
"fType": "CHAR(10)",
"index": "no",
"autoIncrement": "no",
"relation": []
}
]
},
{
2019-04-12 16:36:18 +03:00
"tableName": "itemtype",
"tableDescription": "Тип оборудования",
"fieldList": [
{
"fName": "id",
2019-04-12 16:36:18 +03:00
"fDescription": "UID",
"fType": "INTEGER",
"index": "PRIMARY KEY",
"autoIncrement": "yes",
"relation": []
},
{
2019-04-12 16:36:18 +03:00
"fName": "type_name",
"fDescription": "Тип",
"fType": "VARCHAR(100)",
"index": "no",
"autoIncrement": "no",
"relation": []
2019-04-12 16:36:18 +03:00
}
]
},
{
"tableName": "itemrelocation",
"tableDescription": "Перемещения",
"fieldList": [
{
"fName": "id",
"fDescription": "UID",
"fType": "INTEGER",
"index": "PRIMARY KEY",
"autoIncrement": "yes",
"relation": []
},
{
2019-04-12 16:36:18 +03:00
"fName": "item_id",
"fDescription": "Оборудование",
2018-11-10 14:53:46 +03:00
"fType": "INTEGER",
"index": "no",
"autoIncrement": "no",
2019-04-12 16:36:18 +03:00
"relation": ["items.id", "item_name, inventory_number"]
},
{
"fName": "source_place",
"fDescription": "Откуда",
"fType": "INTEGER",
"index": "no",
"autoIncrement": "no",
"relation": ["address.id", "city, street, house"]
},
{
"fName": "destination_place",
"fDescription": "Куда",
"fType": "INTEGER",
"index": "no",
"autoIncrement": "no",
"relation": ["address.id", "city, street, house"]
},
{
"fName": "create_datetime",
"fDescription": "Дата перемещения",
"fType": "DATETIME",
"index": "no",
"autoIncrement": "no",
"relation": []
}
]
}
]
}