{
    "name": "Product",
    "description": "A Product model",
    "base": "PersistedModel",
    "options": {
        "idInjection": false,
        "mysql": {
            "table": "Product"
        }
    },
    "properties": {
        "organizationId": {
            "type": "number",
            "required": true,
            "length": null,
            "precision": 10,
            "scale": 0,
            "mysql": {
                "columnName": "organizationId",
                "dataType": "int",
                "dataLength": null,
                "dataPrecision": 10,
                "dataScale": 0,
                "nullable": "N"
            }
        },
        "ownerId": {
            "type": "number",
            "required": false,
            "length": null,
            "precision": 10,
            "scale": 0,
            "mysql": {
                "columnName": "ownerId",
                "dataType": "int",
                "dataLength": null,
                "dataPrecision": 10,
                "dataScale": 0,
                "nullable": "Y"
            }
        },
        "code": {
            "type": "string",
            "required": true,
            "length": 50,
            "precision": null,
            "scale": null,
            "mysql": {
                "columnName": "code",
                "dataType": "varchar",
                "dataLength": 50,
                "dataPrecision": null,
                "dataScale": null,
                "nullable": "N"
            }
        },
        "description": {
            "type": "string",
            "required": false,
            "length": 255,
            "precision": null,
            "scale": null,
            "mysql": {
                "columnName": "description",
                "dataType": "varchar",
                "dataLength": 255,
                "dataPrecision": null,
                "dataScale": null,
                "nullable": "Y"
            }
        },
        "productTypeId": {
            "type": "number",
            "required": false,
            "length": null,
            "precision": 10,
            "scale": 0,
            "mysql": {
                "columnName": "productTypeId",
                "dataType": "int",
                "dataLength": null,
                "dataPrecision": 10,
                "dataScale": 0,
                "nullable": "Y"
            }
        },
        "supplierId": {
            "type": "number",
            "required": true,
            "length": null,
            "precision": 10,
            "scale": 0,
            "mysql": {
                "columnName": "supplierId",
                "dataType": "int",
                "dataLength": null,
                "dataPrecision": 10,
                "dataScale": 0,
                "nullable": "N"
            }
        },
        "productUnitId": {
            "type": "number",
            "required": true,
            "length": null,
            "precision": 10,
            "scale": 0,
            "mysql": {
                "columnName": "productUnitId",
                "dataType": "int",
                "dataLength": null,
                "dataPrecision": 10,
                "dataScale": 0,
                "nullable": "N"
            }
        },
        "kitComponent": {
            "type": "boolean",
            "required": true,
            "length": null,
            "precision": 1,
            "scale": 0,
            "mysql": {
                "columnName": "kitComponent",
                "dataType": "tinyint",
                "dataLength": null,
                "dataPrecision": 1,
                "dataScale": 0,
                "nullable": "N"
            }
        },
        "kitControl": {
            "type": "boolean",
            "required": true,
            "length": null,
            "precision": 1,
            "scale": 0,
            "mysql": {
                "columnName": "kitControl",
                "dataType": "tinyint",
                "dataLength": null,
                "dataPrecision": 1,
                "dataScale": 0,
                "nullable": "N"
            }
        },
        "isLot": {
            "type": "boolean",
            "required": true,
            "length": null,
            "precision": 1,
            "scale": 0,
            "mysql": {
                "columnName": "isLot",
                "dataType": "tinyint",
                "dataLength": null,
                "dataPrecision": 1,
                "dataScale": 0,
                "nullable": "N"
            }
        },
        "isExpiredDate": {
            "type": "boolean",
            "required": true,
            "length": null,
            "precision": 1,
            "scale": 0,
            "mysql": {
                "columnName": "isExpiredDate",
                "dataType": "tinyint",
                "dataLength": null,
                "dataPrecision": 1,
                "dataScale": 0,
                "nullable": "N"
            }
        },
        "isSerialNumber": {
            "type": "boolean",
            "required": true,
            "length": null,
            "precision": 1,
            "scale": 0,
            "mysql": {
                "columnName": "isSerialNumber",
                "dataType": "tinyint",
                "dataLength": null,
                "dataPrecision": 1,
                "dataScale": 0,
                "nullable": "N"
            }
        },
        "isWeight": {
            "type": "boolean",
            "required": true,
            "length": null,
            "precision": 1,
            "scale": 0,
            "mysql": {
                "columnName": "isWeight",
                "dataType": "tinyint",
                "dataLength": null,
                "dataPrecision": 1,
                "dataScale": 0,
                "nullable": "N"
            }
        },
        "materialAbc": {
            "type": "string",
            "required": true,
            "length": 2,
            "precision": null,
            "scale": null,
            "mysql": {
                "columnName": "materialAbc",
                "dataType": "varchar",
                "dataLength": 2,
                "dataPrecision": null,
                "dataScale": null,
                "nullable": "N"
            }
        },
        "image": {
            "type": "string",
            "required": false,
            "length": 255,
            "precision": null,
            "scale": null,
            "mysql": {
                "columnName": "image",
                "dataType": "varchar",
                "dataLength": 255,
                "dataPrecision": null,
                "dataScale": null,
                "nullable": "Y"
            }
        },
        "active": {
            "type": "boolean",
            "required": true,
            "length": null,
            "precision": 1,
            "scale": 0,
            "mysql": {
                "columnName": "active",
                "dataType": "tinyint",
                "dataLength": null,
                "dataPrecision": 1,
                "dataScale": 0,
                "nullable": "N"
            }
        },
        "creationDate": {
            "type": "date",
            "required": false,
            "length": null,
            "precision": null,
            "scale": null,
            "mysql": {
                "columnName": "creationDate",
                "dataType": "datetime",
                "dataLength": null,
                "dataPrecision": null,
                "dataScale": null,
                "nullable": "Y"
            }
        },
        "updatedDate": {
            "type": "date",
            "required": false,
            "length": null,
            "precision": null,
            "scale": null,
            "mysql": {
                "columnName": "updatedDate",
                "dataType": "datetime",
                "dataLength": null,
                "dataPrecision": null,
                "dataScale": null,
                "nullable": "Y"
            }
        },
        "createdById": {
            "type": "number",
            "required": false,
            "length": null,
            "precision": 10,
            "scale": 0,
            "mysql": {
                "columnName": "createdById",
                "dataType": "int",
                "dataLength": null,
                "dataPrecision": 10,
                "dataScale": 0,
                "nullable": "Y"
            }
        },
        "updatedById": {
            "type": "number",
            "required": false,
            "length": null,
            "precision": 10,
            "scale": 0,
            "mysql": {
                "columnName": "updatedById",
                "dataType": "int",
                "dataLength": null,
                "dataPrecision": 10,
                "dataScale": 0,
                "nullable": "Y"
            }
        }
    },
    "relations": {
        "organization": {
            "type": "belongsTo",
            "model": "Organization",
            "foreignKey": "organizationId"
        },
        "owner": {
            "type": "belongsTo",
            "model": "Owner",
            "foreignKey": "ownerId"
        },
        "supplier": {
            "type": "belongsTo",
            "model": "Supplier",
            "foreignKey": "supplierId"
        },
        "productPackings": {
            "type": "hasMany",
            "model": "ProductPacking",
            "foreignKey": "productId"
        },
        "productType": {
            "type": "belongsTo",
            "model": "ProductType",
            "foreignKey": "productTypeId"
        },
        "productUnit": {
            "type": "belongsTo",
            "model": "ProductUnit",
            "foreignKey": "productUnitId"
        },
        "createdBy": {
            "type": "belongsTo",
            "model": "Customer",
            "foreignKey": "createdById"
        },
        "updatedBy": {
            "type": "belongsTo",
            "model": "Customer",
            "foreignKey": "updatedById"
        }
    },
    "acls": [],
    "methods": {}
}
