INSERT IGNORE INTO branch
  (type, num )
VALUES
  ('NMLS', 'abc123idk'),
  ('FSRA', 'another branch');

INSERT IGNORE INTO user (
	first_name,
	last_name,
	password,
	branch_id,
	country,
	title,
	email,
	verified,
	status
) VALUES

(
	'Blue',
	'Coltrane',
	sha2('test123', 256),
	(SELECT id FROM branch LIMIT 1),
	'Canada',
	'Loan Officer',
	'test@example.com',
	true,
	'Free'
),

(
	'Giant',
	'Coltrane',
	sha2('test123', 256),
	null,
	'USA',
	'Mortgage Broker',
	'unverified@example.com',
	false,
	'Free'
),

(
	'Jeru',
	'Mulligan',
	sha2('test123', 256),
	(SELECT id FROM branch LIMIT 1),
	'USA',
	'Branch Manager',
	'manager@example.com',
	true,
	'Free'
);

INSERT IGNORE INTO license (
	user_id,
	type,
	num
) VALUES
(
	(SELECT id FROM user WHERE email = 'test@example.com' LIMIT 1),
	'NMLS',
	'randomnml523s'
),
(
	(SELECT id FROM user WHERE email = 'manager@example.com' LIMIT 1),
	'FSRA',
	'5234gsdf'
);

INSERT IGNORE INTO loan_type (
	branch_id,
	user_id,
	name
) VALUES
(
	(SELECT id FROM branch LIMIT 1),
	NULL,
	'testType'
),
(
	NULL,
	(SELECT id FROM user WHERE email="manager@example.com" LIMIT 1),
	'manager idea'
);
