{ "module": "pipicar", "name": "pipicar.auto", "type": "crud", "title": "Автомобили", "withHeader": false, "data": { "table": "pipi_auto", "pk": "id", "limit": 25, "segment": true, "timestamp": true, "fields": { "id": { "type": "pk" }, "code": { "type": "string", "validation": "required", "comment": "Код" }, "name": { "type": "string", "nullable": true, "comment": "Наименование" }, "type_id": { "type": "foreign", "table": "pipi_auto_types", "foreign": "id", "display": ["name"], "nullable": true, "comment": "Тип" }, "class_id": { "type": "foreign", "table": "pipi_auto_classes", "foreign": "id", "display": ["name"], "nullable": true, "comment": "Класс" }, "brand_id": { "type": "foreign", "table": "pipi_auto_brands", "foreign": "id", "display": ["name"], "nullable": true, "comment": "Марка" }, "model_id": { "type": "foreign", "table": "pipi_brand_models", "foreign": "id", "display": ["name"], "nullable": true, "comment": "Модель" }, "color_id": { "type": "foreign", "table": "pipi_auto_colors", "foreign": "id", "display": ["name"], "nullable": true, "comment": "Цвет" }, "serial_number": { "type": "string", "nullable": true, "comment": "Серийный номер" }, "state_number": { "type": "string", "nullable": true, "comment": "Госномер" }, "manufacture_year": { "type": "date", "nullable": true, "comment": "Год производства" }, "passport_number": { "type": "string", "nullable": true, "comment": "Номер техпаспорта" }, "passport_date": { "type": "date", "nullable": true, "comment": "Дата техпаспорта" }, "estimated_cost": { "type": "float", "nullable": true, "comment": "Оценочная стоимость" }, "owner_id": { "type": "foreign", "table": "pipi_owners", "foreign": "id", "display": ["name"], "nullable": true, "comment": "Владелец имущества" }, "is_trust_management": { "type": "boolean", "default": false, "comment": "В доверенном управлении" }, "owner_percentage": { "type": "integer", "nullable": true, "comment": "Процент владельца" }, "owner_contract": { "type": "string", "nullable": true, "comment": "Договор владельца имущества" }, "is_inactive": { "type": "boolean", "default": false, "comment": "Не использовать" }, "inspection_kit": { "type": "json", "nullable": true, "comment": "Комплектация для осмотра" }, "is_predefined": { "type": "boolean", "default": false, "comment": "Предопределенный" }, "predefined_data_name": { "type": "string", "nullable": true, "comment": "Имя предопределенных данных" }, "created_at": { "type": "timestamp", "comment": "Дата создания" }, "updated_at": { "type": "timestamp", "comment": "Дата обновления" }, "deleted_at": { "type": "timestamp", "nullable": true, "comment": "Дата удаления" }, "photo_id": { "type": "int", "validation": "nullable|int" }, "regular_user": { "type": "foreign", "table": "core_users", "foreign": "id", "display": ["username"], "nullable": true, "comment": "Постоянный клиент" } } }, "ui": { "grid": { "title": "Автомобили", "component": "App.components.Grid", "cols": [ { "name": "code", "caption": "Код" }, { "name": "name", "caption": "Наименование" }, { "name": "brand_id", "caption": "Марка" }, { "name": "model_id", "caption": "Модель" }, { "name": "state_number", "caption": "Госномер" }, { "name": "manufacture_year", "caption": "Год производства" } ], "action": { "head": [], "row": [ "edit", "delete" ] }, "filter": { "template": "app.base.crud.filter", "rows": [ { "cols": [ { "size": 4, "input": { "name": "code", "label": "Код" } }, { "size": 4, "input": { "name": "name", "label": "Наименование" } }, { "size": 4, "input": { "name": "state_number", "label": "Госномер" } } ] } ] } }, "forms": { "add": { "title": "Добавление автомобиля", "template": "app.base.crud.form", "component": "App.components.Show", "form": { "submits": "struct:crud.form.edit.submits", "rows": [ { "cols": [ { "size": 4, "input": { "name": "code", "label": "Код" } }, { "size": 4, "input": { "name": "name", "label": "Наименование" } }, { "size": 4, "input": { "name": "state_number", "label": "Госномер" } } ] }, { "cols": [ { "size": 4, "input": { "name": "brand_id", "label": "Марка" } }, { "size": 4, "input": { "name": "model_id", "label": "Модель" } }, { "size": 4, "input": { "name": "color_id", "label": "Цвет" } } ] }, { "cols": [ { "size": 4, "input": { "name": "manufacture_year", "label": "Год производства" } }, { "size": 4, "input": { "name": "estimated_cost", "label": "Оценочная стоимость" } }, { "size": 4, "input": { "name": "regular_user", "label": "Постоянный клиент" } }, { "size": 12, "input": { "name": "photo_id", "label": "Фото", "type": "file" } } ] } ] } }, "edit": { "title": "Редактирование автомобиля", "template": "app.base.crud.form", "component": "App.components.Show", "form": { "rows": [ { "cols": [ { "size": 4, "input": { "name": "code", "label": "Код", "readonly": true } }, { "size": 4, "input": { "name": "name", "label": "Наименование", "readonly": true } }, { "size": 4, "input": { "name": "state_number", "label": "Госномер", "readonly": true } } ] }, { "cols": [ { "size": 4, "input": { "name": "brand_id", "label": "Марка", "readonly": true } }, { "size": 4, "input": { "name": "model_id", "label": "Модель", "readonly": true } }, { "size": 4, "input": { "name": "color_id", "label": "Цвет", "readonly": true } } ] }, { "cols": [ { "size": 4, "input": { "name": "manufacture_year", "label": "Год производства", "readonly": true } }, { "size": 4, "input": { "name": "estimated_cost", "label": "Оценочная стоимость", "readonly": true } }, { "size": 4, "input": { "name": "regular_user", "label": "Постоянный клиент" } }, { "size": 12, "input": { "name": "photo_id", "label": "Фото", "type": "file" } } ] } ], "submits": "struct:crud.form.edit.submits" } } } }, "actions": "struct:crud.actions" }