{"size": 679, "ext": "js", "max_stars_repo_path": "models/userdata.js", "max_stars_repo_name": "MarciglianoIT/mitc-support-backend", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "models/userdata.js", "max_issues_repo_name": "MarciglianoIT/mitc-support-backend", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "models/userdata.js", "max_forks_repo_name": "MarciglianoIT/mitc-support-backend", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.9032258065, "max_line_length": 47, "alphanum_fraction": 0.6715758468}
"use strict";
const { DataTypes } = require("sequelize");
const sequelize = require("../util/database");

const User = require("./user");

const UserData = sequelize.define("UserData", {
  id: {
    allowNull: false,
    primaryKey: true,
    type: DataTypes.STRING,
    onDelete: "CASCADE",
    onUpdate: "RESTRICT",
    references: {
      model: "UserData",
      key: "id",
    },
  },
  firstName: DataTypes.STRING,
  lastName: DataTypes.STRING,
  companyName: DataTypes.STRING,
  addressCountry: DataTypes.STRING,
  addressStreet: DataTypes.STRING,
  addressZip: DataTypes.STRING,
  addressCity: DataTypes.STRING,
});

// UserData.hasOne(User);

module.exports = UserData;
