Skouter mortgage estimates. Web application with view written in PHP and Vue, but controller and models in Go.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

334 lignes
3.7 KiB

  1. INSERT IGNORE INTO branch
  2. (type, num )
  3. VALUES
  4. ('NMLS', 'abc123idk'),
  5. ('FSRA', 'another branch');
  6. INSERT IGNORE INTO user (
  7. first_name,
  8. last_name,
  9. password,
  10. branch_id,
  11. country,
  12. title,
  13. email,
  14. verified,
  15. role,
  16. status
  17. ) VALUES
  18. (
  19. 'Blue',
  20. 'Coltrane',
  21. sha2('test123', 256),
  22. (SELECT id FROM branch LIMIT 1),
  23. 'Canada',
  24. 'Loan Officer',
  25. 'test@example.com',
  26. true,
  27. 'User',
  28. 'Free'
  29. ),
  30. (
  31. 'Giant',
  32. 'Coltrane',
  33. sha2('test123', 256),
  34. 0,
  35. 'USA',
  36. 'Mortgage Broker',
  37. 'unverified@example.com',
  38. false,
  39. 'User',
  40. 'Free'
  41. ),
  42. (
  43. 'Jeru',
  44. 'Mulligan',
  45. sha2('test123', 256),
  46. (SELECT id FROM branch LIMIT 1),
  47. 'USA',
  48. 'Branch Manager',
  49. 'manager@example.com',
  50. true,
  51. 'Manager',
  52. 'Free'
  53. );
  54. INSERT IGNORE INTO license (
  55. user_id,
  56. type,
  57. num
  58. ) VALUES
  59. (
  60. (SELECT id FROM user WHERE email = 'test@example.com' LIMIT 1),
  61. 'NMLS',
  62. 'randomnml523s'
  63. ),
  64. (
  65. (SELECT id FROM user WHERE email = 'manager@example.com' LIMIT 1),
  66. 'FSRA',
  67. '5234gsdf'
  68. );
  69. INSERT IGNORE INTO loan_type (
  70. branch_id,
  71. user_id,
  72. name
  73. ) VALUES
  74. (
  75. (SELECT id FROM branch LIMIT 1),
  76. 0,
  77. 'testType'
  78. ),
  79. (
  80. 0,
  81. (SELECT id FROM user WHERE email="manager@example.com" LIMIT 1),
  82. 'manager idea'
  83. );
  84. INSERT IGNORE INTO fee_template (
  85. user_id,
  86. branch_id,
  87. amount,
  88. perc,
  89. type,
  90. auto,
  91. name
  92. ) VALUES
  93. (
  94. 0,
  95. (SELECT id FROM branch LIMIT 1),
  96. 0,
  97. 200,
  98. 'Title',
  99. true,
  100. "LenderS's Title Insurance"
  101. ),
  102. (
  103. (SELECT id FROM user WHERE email="manager@example.com" LIMIT 1),
  104. (SELECT id FROM branch LIMIT 1),
  105. 5250,
  106. 0,
  107. 'Required',
  108. true,
  109. "Appraisal"
  110. ),
  111. (
  112. (SELECT id FROM user WHERE email="test@example.com" LIMIT 1),
  113. 0,
  114. 9900,
  115. 0,
  116. "Government",
  117. false,
  118. "Recording Charges"
  119. ),
  120. (
  121. (SELECT id FROM user WHERE email="test@example.com" LIMIT 1),
  122. 0,
  123. 0,
  124. 400,
  125. 'Lender',
  126. true,
  127. "Processing fee"
  128. );
  129. INSERT IGNORE INTO loan_type (
  130. user_id,
  131. branch_id,
  132. name
  133. ) VALUES
  134. (
  135. 0,
  136. 0,
  137. "Conventional"
  138. ),
  139. (
  140. 0,
  141. 0,
  142. "FHA"
  143. ),
  144. (
  145. 0,
  146. 0,
  147. "VA"
  148. ),
  149. (
  150. 0,
  151. 0,
  152. "USDA"
  153. ),
  154. (
  155. 0,
  156. (SELECT id FROM branch LIMIT 1),
  157. "Test"
  158. );
  159. INSERT IGNORE INTO borrower (
  160. credit_score,
  161. monthly_income,
  162. num
  163. ) VALUES
  164. (
  165. 740,
  166. 500000,
  167. 1
  168. );
  169. INSERT INTO estimate (
  170. user_id,
  171. borrower_id,
  172. transaction,
  173. price,
  174. property,
  175. occupancy,
  176. zip,
  177. pud
  178. ) VALUES
  179. (
  180. (SELECT id FROM user WHERE email="test@example.com" LIMIT 1),
  181. (SELECT id FROM borrower ORDER BY id DESC LIMIT 1),
  182. 'Purchase',
  183. 100000000,
  184. 1,
  185. 1,
  186. '95051',
  187. false
  188. ),
  189. (
  190. (SELECT id FROM user WHERE email="manager@example.com" LIMIT 1),
  191. (SELECT id FROM borrower ORDER BY id DESC LIMIT 1),
  192. 'Purchase',
  193. 25000000,
  194. 2,
  195. 1,
  196. '95051',
  197. false
  198. ),
  199. (
  200. (SELECT id FROM user WHERE email="test@example.com" LIMIT 1),
  201. (SELECT id FROM borrower ORDER BY id DESC LIMIT 1),
  202. 'Refinance',
  203. 50000000,
  204. 3,
  205. 2,
  206. '95051',
  207. false
  208. );
  209. INSERT INTO loan (
  210. estimate_id,
  211. type_id,
  212. amount,
  213. term,
  214. interest,
  215. ltv,
  216. dti,
  217. hoi,
  218. name
  219. ) VALUES
  220. (
  221. 1,
  222. (SELECT id FROM loan_type WHERE name="Conventional"),
  223. 3300000,
  224. 30,
  225. 375,
  226. 88.00,
  227. 5.00,
  228. 0,
  229. "For client 1"
  230. ),
  231. (
  232. 1,
  233. (SELECT id FROM loan_type WHERE name="FHA"),
  234. 2510000,
  235. 30,
  236. 300,
  237. 90.00,
  238. 6.70,
  239. 0,
  240. "For client 2"
  241. ),
  242. (
  243. 3,
  244. (SELECT id FROM loan_type WHERE name="FHA"),
  245. 2510000,
  246. 30,
  247. 300,
  248. 90.00,
  249. 6.70,
  250. 0,
  251. "For client 2"
  252. ),
  253. (
  254. 2,
  255. (SELECT id FROM loan_type WHERE name="USDA"),
  256. 8000000,
  257. 10,
  258. 125,
  259. 95.00,
  260. 4.90,
  261. 0,
  262. "Random name"
  263. );
  264. INSERT INTO mi (
  265. loan_id,
  266. type,
  267. label,
  268. lender,
  269. rate,
  270. premium,
  271. upfront,
  272. five_year_total,
  273. initial_premium,
  274. initial_rate
  275. ) VALUES
  276. (
  277. 1,
  278. "BPM",
  279. "National MI test loan",
  280. "National MI",
  281. 28,
  282. 77000,
  283. 0,
  284. 4620000,
  285. 77000,
  286. 28
  287. );
  288. INSERT INTO estimate_result (
  289. loan_id,
  290. loan_payment,
  291. total_monthly,
  292. total_fees,
  293. total_credits,
  294. cash_to_close
  295. ) VALUES
  296. (
  297. 1,
  298. 258060,
  299. 311500,
  300. 87211,
  301. -15089,
  302. 411822
  303. ),
  304. (
  305. 2,
  306. 198060,
  307. 241500,
  308. 54400,
  309. -10089,
  310. 310022
  311. ),
  312. (
  313. 3,
  314. 118000,
  315. 350000,
  316. 54400,
  317. -70089,
  318. 411699
  319. );