Skouter mortgage estimates. Web application with view written in PHP and Vue, but controller and models in Go.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

289 wiersze
3.3 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. 2,
  244. (SELECT id FROM loan_type WHERE name="USDA"),
  245. 8000000,
  246. 10,
  247. 125,
  248. 95.00,
  249. 4.90,
  250. 0,
  251. "Random name"
  252. );
  253. INSERT INTO mi (
  254. loan_id,
  255. type,
  256. label,
  257. lender,
  258. rate,
  259. premium,
  260. upfront,
  261. five_year_total,
  262. initial_premium,
  263. initial_rate
  264. ) VALUES
  265. (
  266. 1,
  267. "BPM",
  268. "National MI test loan",
  269. "National MI",
  270. 28,
  271. 77000,
  272. 0,
  273. 4620000,
  274. 77000,
  275. 28
  276. );