{
    "name": "Customer",
    "description": "A Customer model",
    "base": "User",
    "options": {
        "idInjection": false,
        "mysql": {
            "table": "Customer"
        },
        "validateUpsert": true
    },
    "properties": {
        "firstName": {
            "type": "string",
            "required": true,
            "length": 255,
            "precision": null,
            "scale": null,
            "mysql": {
                "columnName": "firstName",
                "dataType": "varchar",
                "dataLength": 255,
                "dataPrecision": null,
                "dataScale": null,
                "nullable": "N"
            }
        },
        "lastName": {
            "type": "string",
            "required": true,
            "length": 255,
            "precision": null,
            "scale": null,
            "mysql": {
                "columnName": "lastName",
                "dataType": "varchar",
                "dataLength": 255,
                "dataPrecision": null,
                "dataScale": null,
                "nullable": "N"
            }
        },
        "telephone": {
            "type": "string",
            "required": false,
            "length": 20,
            "precision": null,
            "scale": null,
            "mysql": {
                "columnName": "telephone",
                "dataType": "varchar",
                "dataLength": 20,
                "dataPrecision": null,
                "dataScale": null,
                "nullable": "Y"
            }
        },
        "memory": {
            "type": "string",
            "required": true,
            "length": 45,
            "precision": null,
            "scale": null,
            "mysql": {
                "columnName": "memory",
                "dataType": "varchar",
                "dataLength": 45,
                "dataPrecision": null,
                "dataScale": null,
                "nullable": "Y"
            }
        },
        "ownerId": {
            "type": "number",
            "required": false,
            "length": null,
            "precision": 11,
            "scale": 0,
            "mysql": {
                "columnName": "ownerId",
                "dataType": "int",
                "dataLength": null,
                "dataPrecision": 11,
                "dataScale": 0,
                "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"
            }
        },
        "createdById": {
            "type": "number",
            "required": false,
            "length": null,
            "precision": 11,
            "scale": 0,
            "mysql": {
                "columnName": "createdById",
                "dataType": "int",
                "dataLength": null,
                "dataPrecision": 11,
                "dataScale": 0,
                "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"
            }
        },
        "updatedById": {
            "type": "number",
            "required": false,
            "length": null,
            "precision": 11,
            "scale": 0,
            "mysql": {
                "columnName": "updatedById",
                "dataType": "int",
                "dataLength": null,
                "dataPrecision": 11,
                "dataScale": 0,
                "nullable": "Y"
            }
        }
    },
    "validations": [],
    "relations": {
        "areas": {
            "type": "hasMany",
            "model": "Area",
            "foreignKey": "customerId",
            "through": "AreaCustomer"
        },
        "owner": {
            "type": "belongsTo",
            "model": "Owner",
            "foreignKey": "ownerId"
        },
        "roles": {
            "type": "hasMany",
            "model": "Role",
            "foreignKey": "principalId",
            "through": "RoleMapping"
        },
        "createdBy": {
            "type": "belongsTo",
            "model": "Customer",
            "foreignKey": "createdById"
        },
        "updatedBy": {
            "type": "belongsTo",
            "model": "Customer",
            "foreignKey": "updatedById"
        }
    },
    "scope": {},
    "acls": [
        {
            "principalType": "ROLE",
            "principalId": "$everyone",
            "permission": "DENY"
        },
        {
            "principalType": "ROLE",
            "principalId": "$authenticated",
            "permission": "ALLOW"
        },
        {
            "principalType": "ROLE",
            "principalId": "$everyone",
            "permission": "ALLOW",
            "property": "find"
        },
        {
            "principalType": "ROLE",
            "principalId": "$everyone",
            "permission": "ALLOW",
            "property": "findById"
        },
        {
            "principalType": "ROLE",
            "principalId": "$everyone",
            "permission": "ALLOW",
            "property": "findOne"
        },
        {
            "principalType": "ROLE",
            "principalId": "$everyone",
            "permission": "ALLOW",
            "property": "current",
            "accessType": "EXECUTE"
        }
    ],
    "methods": {}
}
