Advertisement
Guest User

Untitled

a guest
Feb 21st, 2020
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.71 KB | None | 0 0
  1. create_table "addresses", force: :cascade do |t|
  2. t.bigint "user_id"
  3. t.bigint "city_id"
  4. t.bigint "province_id"
  5. t.bigint "subdistrict_id"
  6. t.string "slug"
  7. t.string "name"
  8. t.string "lat"
  9. t.string "lon"
  10. t.string "address"
  11. t.string "phone"
  12. t.datetime "created_at", null: false
  13. t.datetime "updated_at", null: false
  14. t.index ["city_id"], name: "index_addresses_on_city_id"
  15. t.index ["province_id"], name: "index_addresses_on_province_id"
  16. t.index ["slug"], name: "index_addresses_on_slug"
  17. t.index ["subdistrict_id"], name: "index_addresses_on_subdistrict_id"
  18. t.index ["user_id"], name: "index_addresses_on_user_id"
  19. end
  20.  
  21. create_table "admins", force: :cascade do |t|
  22. t.string "email", default: "", null: false
  23. t.string "encrypted_password", default: "", null: false
  24. t.string "name"
  25. t.string "status"
  26. t.string "role"
  27. t.string "auth_token"
  28. t.string "firebase_token"
  29. t.string "slug"
  30. t.string "phone"
  31. t.integer "level", default: 0
  32. t.string "photo"
  33. t.text "jwt"
  34. t.string "reset_password_token"
  35. t.datetime "reset_password_sent_at"
  36. t.datetime "remember_created_at"
  37. t.integer "sign_in_count", default: 0, null: false
  38. t.datetime "current_sign_in_at"
  39. t.datetime "last_sign_in_at"
  40. t.string "current_sign_in_ip"
  41. t.string "last_sign_in_ip"
  42. t.datetime "created_at", null: false
  43. t.datetime "updated_at", null: false
  44. t.index ["auth_token"], name: "index_admins_on_auth_token", unique: true
  45. t.index ["email"], name: "index_admins_on_email", unique: true
  46. t.index ["firebase_token"], name: "index_admins_on_firebase_token", unique: true
  47. t.index ["reset_password_token"], name: "index_admins_on_reset_password_token", unique: true
  48. t.index ["slug"], name: "index_admins_on_slug", unique: true
  49. end
  50.  
  51. create_table "cart_items", force: :cascade do |t|
  52. t.bigint "cart_id"
  53. t.bigint "product_id"
  54. t.float "price"
  55. t.float "base_price"
  56. t.integer "amount"
  57. t.float "subtotal"
  58. t.float "base_subtotal"
  59. t.datetime "created_at", null: false
  60. t.datetime "updated_at", null: false
  61. t.index ["cart_id"], name: "index_cart_items_on_cart_id"
  62. t.index ["product_id"], name: "index_cart_items_on_product_id"
  63. end
  64.  
  65. create_table "carts", force: :cascade do |t|
  66. t.bigint "user_id"
  67. t.bigint "admin_id"
  68. t.string "slug"
  69. t.float "total"
  70. t.string "status"
  71. t.string "trx_id"
  72. t.string "payment_date"
  73. t.string "payment_status"
  74. t.string "payment_status_desc"
  75. t.string "payment_receipt"
  76. t.string "payment_channel_code"
  77. t.string "payment_channel_name"
  78. t.datetime "created_at", null: false
  79. t.datetime "updated_at", null: false
  80. t.index ["admin_id"], name: "index_carts_on_admin_id"
  81. t.index ["slug"], name: "index_carts_on_slug"
  82. t.index ["user_id"], name: "index_carts_on_user_id"
  83. end
  84.  
  85. create_table "cities", force: :cascade do |t|
  86. t.bigint "province_id"
  87. t.string "name"
  88. t.string "tipe"
  89. t.string "postal_code"
  90. t.index ["province_id"], name: "index_cities_on_province_id"
  91. end
  92.  
  93. create_table "currencies", force: :cascade do |t|
  94. t.string "name"
  95. t.string "slug"
  96. t.float "rate"
  97. t.boolean "base"
  98. t.string "roundup"
  99. t.datetime "created_at", null: false
  100. t.datetime "updated_at", null: false
  101. t.index ["slug"], name: "index_currencies_on_slug"
  102. end
  103.  
  104. create_table "faspay_channels", force: :cascade do |t|
  105. t.string "name"
  106. t.string "code"
  107. t.string "icon"
  108. t.boolean "active"
  109. t.datetime "created_at", null: false
  110. t.datetime "updated_at", null: false
  111. end
  112.  
  113. create_table "offices", force: :cascade do |t|
  114. t.bigint "city_id"
  115. t.bigint "province_id"
  116. t.bigint "subdistrict_id"
  117. t.string "slug"
  118. t.string "name"
  119. t.string "lat"
  120. t.string "lon"
  121. t.string "photo"
  122. t.string "address"
  123. t.datetime "created_at", null: false
  124. t.datetime "updated_at", null: false
  125. t.index ["city_id"], name: "index_offices_on_city_id"
  126. t.index ["province_id"], name: "index_offices_on_province_id"
  127. t.index ["slug"], name: "index_offices_on_slug"
  128. t.index ["subdistrict_id"], name: "index_offices_on_subdistrict_id"
  129. end
  130.  
  131. create_table "photos", force: :cascade do |t|
  132. t.bigint "product_id"
  133. t.string "pict"
  134. t.datetime "created_at", null: false
  135. t.datetime "updated_at", null: false
  136. t.index ["product_id"], name: "index_photos_on_product_id"
  137. end
  138.  
  139. create_table "products", force: :cascade do |t|
  140. t.bigint "office_id"
  141. t.string "slug"
  142. t.string "code"
  143. t.string "name"
  144. t.string "status"
  145. t.string "photo"
  146. t.text "description"
  147. t.datetime "created_at", null: false
  148. t.datetime "updated_at", null: false
  149. t.index ["office_id"], name: "index_products_on_office_id"
  150. t.index ["slug"], name: "index_products_on_slug"
  151. end
  152.  
  153. create_table "provinces", force: :cascade do |t|
  154. t.string "name"
  155. end
  156.  
  157. create_table "roots", force: :cascade do |t|
  158. t.string "email", default: "", null: false
  159. t.string "encrypted_password", default: "", null: false
  160. t.string "name"
  161. t.string "auth_token"
  162. t.string "firebase_token"
  163. t.index ["auth_token"], name: "index_roots_on_auth_token", unique: true
  164. t.index ["email"], name: "index_roots_on_email", unique: true
  165. t.index ["firebase_token"], name: "index_roots_on_firebase_token", unique: true
  166. end
  167.  
  168. create_table "shipments", force: :cascade do |t|
  169. t.bigint "admin_id"
  170. t.bigint "user_id"
  171. t.bigint "cart_id"
  172. t.bigint "office_id"
  173. t.bigint "address_id"
  174. t.string "slug"
  175. t.string "pickup_hotel"
  176. t.string "pickup_lat"
  177. t.string "pickup_lon"
  178. t.string "pickup_room"
  179. t.string "delivery_name"
  180. t.string "delivered_phone"
  181. t.string "delivered_address"
  182. t.string "status"
  183. t.string "resi_number"
  184. t.string "note"
  185. t.datetime "created_at", null: false
  186. t.datetime "updated_at", null: false
  187. t.index ["address_id"], name: "index_shipments_on_address_id"
  188. t.index ["admin_id"], name: "index_shipments_on_admin_id"
  189. t.index ["cart_id"], name: "index_shipments_on_cart_id"
  190. t.index ["office_id"], name: "index_shipments_on_office_id"
  191. t.index ["slug"], name: "index_shipments_on_slug"
  192. t.index ["user_id"], name: "index_shipments_on_user_id"
  193. end
  194.  
  195. create_table "subdistricts", force: :cascade do |t|
  196. t.bigint "city_id"
  197. t.bigint "province_id"
  198. t.string "name"
  199. t.index ["city_id"], name: "index_subdistricts_on_city_id"
  200. t.index ["province_id"], name: "index_subdistricts_on_province_id"
  201. end
  202.  
  203. create_table "users", force: :cascade do |t|
  204. t.string "email", default: "", null: false
  205. t.string "encrypted_password", default: "", null: false
  206. t.string "name"
  207. t.string "slug"
  208. t.string "status", default: "ACTIVE"
  209. t.string "phone"
  210. t.string "auth_token"
  211. t.string "firebase_token"
  212. t.string "photo"
  213. t.string "jwt"
  214. t.boolean "optin_email"
  215. t.string "reset_password_token"
  216. t.datetime "reset_password_sent_at"
  217. t.datetime "remember_created_at"
  218. t.integer "sign_in_count", default: 0, null: false
  219. t.datetime "current_sign_in_at"
  220. t.datetime "last_sign_in_at"
  221. t.string "current_sign_in_ip"
  222. t.string "last_sign_in_ip"
  223. t.datetime "created_at", null: false
  224. t.datetime "updated_at", null: false
  225. t.index ["email"], name: "index_users_on_email", unique: true
  226. t.index ["phone"], name: "index_users_on_phone", unique: true
  227. t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
  228. t.index ["slug"], name: "index_users_on_slug"
  229. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement