Skip to content

Instantly share code, notes, and snippets.

@mihairaulea
mihairaulea / dataBlueprint.js
Created August 9, 2023 22:15
Blueprint for the data layer used to store cold email marketing campaigns
// ALL table are mongodb collections
// does capping this collection give it hashmap-like props? ask mongodb expert
// db.createCollection("userData", {capped: true, size: 100000000})
// table
let userData = new Map();
// table
let emailIdToUserId = new Map();
const { Sequelize, DataTypes } = require('sequelize');
const sequelize = new Sequelize('postgres://postgres:HfQFIgMH-15H3-VfhI5TFA@postgresql-kauog-u4087.vm.elestio.app:34523/postgres');
// get searches while there are still processed: false
const Search = sequelize.define('Search', {
searchURL: {
type:DataTypes.STRING,
processed: DataTypes.BOOLEAN,
allowNull:false
}
{"id":"Abg2F3OI9yNev0hyUgWuKQ_0000","full_name":"genesis ilaye","first_name":"genesis","middle_initial":null,"middle_name":null,"last_name":"ilaye","gender":null,"birth_year":null,"birth_date":null,"linkedin_url":"linkedin.com/in/genesis-ilaye-3b3371122","linkedin_username":"genesis-ilaye-3b3371122","linkedin_id":null,"facebook_url":null,"facebook_username":null,"facebook_id":null,"twitter_url":null,"twitter_username":null,"github_url":null,"github_username":null,"work_email":null,"mobile_phone":null,"industry":"electrical/electronic manufacturing","job_title":"electrical engineer","job_title_role":"engineering","job_title_sub_role":"electrical","job_title_levels":[],"job_company_id":null,"job_company_name":"emmaspin","job_company_website":null,"job_company_size":null,"job_company_founded":null,"job_company_industry":null,"job_company_linkedin_url":null,"job_company_linkedin_id":null,"job_company_facebook_url":null,"job_company_twitter_url":null,"job_company_location_name":null,"job_company_location_locality"