| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289 |
- # encoding: UTF-8
- # This file is auto-generated from the current state of the database. Instead
- # of editing this file, please use the migrations feature of Active Record to
- # incrementally modify your database, and then regenerate this schema definition.
- #
- # Note that this schema.rb definition is the authoritative source for your
- # database schema. If you need to create the application database on another
- # system, you should be using db:schema:load, not running all the migrations
- # from scratch. The latter is a flawed and unsustainable approach (the more migrations
- # you'll amass, the slower it'll run and the greater likelihood for issues).
- #
- # It's strongly recommended that you check this file into your version control system.
- ActiveRecord::Schema.define(version: 20260325000100) do
- create_table "1125_wx_users", force: :cascade do |t|
- t.integer "user_id", limit: 4
- t.integer "invite_id", limit: 4, default: 0
- t.string "mp_openid", limit: 64
- t.string "openid", limit: 64
- t.string "nickname", limit: 100
- t.string "unionid", limit: 64, default: "\"\""
- t.string "city", limit: 20
- t.string "country", limit: 20
- t.string "province", limit: 20
- t.integer "sex", limit: 1, default: 0
- t.string "head", limit: 255
- t.boolean "subscribe"
- t.boolean "is_regist", default: false
- t.integer "subscribe_time", limit: 4, default: 0
- t.integer "unsubscribe_time", limit: 4, default: 0
- t.integer "last_conversation_at", limit: 4, default: 0
- t.integer "channel_qrcode_id", limit: 4
- t.string "signup_ip", limit: 255
- t.string "invite_qrcode_url", limit: 255
- t.boolean "show_invite_mode", default: false
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "intro_user_id", limit: 4
- t.text "intro_inner_no", limit: 65535
- t.string "intro_area", limit: 2
- t.integer "depth", limit: 4, default: 0, null: false
- t.decimal "sale_group", precision: 12, scale: 2, default: 0.0, null: false
- t.decimal "sale_group_sum", precision: 20, scale: 2, default: 0.0, null: false
- t.decimal "sale_score", precision: 12, scale: 2
- t.integer "rank", limit: 8, default: 0
- t.integer "partner_time", limit: 4, default: 0, null: false
- t.string "user_no", limit: 128
- end
- add_index "1125_wx_users", ["last_conversation_at"], name: "index_1125_wx_users_on_last_conversation_at", using: :btree
- add_index "1125_wx_users", ["user_id"], name: "index_1125_wx_users_on_user_id", using: :btree
- create_table "ad_item_click_statistics", force: :cascade do |t|
- t.integer "ad_item_id", limit: 4, null: false
- t.integer "wx_uid", limit: 4, null: false
- t.string "ip", limit: 32
- t.integer "click_times", limit: 4, null: false
- t.datetime "click_last_time"
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "ad_item_click_statistics", ["ad_item_id"], name: "index_ad_item_click_statistics_on_ad_item_id", using: :btree
- add_index "ad_item_click_statistics", ["wx_uid", "ad_item_id"], name: "index_ad_item_click_statistics_on_wx_uid_and_ad_item_id", unique: true, using: :btree
- add_index "ad_item_click_statistics", ["wx_uid"], name: "index_ad_item_click_statistics_on_wx_uid", using: :btree
- create_table "ad_item_show_statistics", force: :cascade do |t|
- t.integer "ad_item_id", limit: 4, null: false
- t.integer "wx_uid", limit: 4, null: false
- t.string "ip", limit: 32
- t.integer "show_times", limit: 4, null: false
- t.datetime "show_last_time"
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "ad_item_show_statistics", ["ad_item_id"], name: "index_ad_item_show_statistics_on_ad_item_id", using: :btree
- add_index "ad_item_show_statistics", ["wx_uid", "ad_item_id"], name: "index_ad_item_show_statistics_on_wx_uid_and_ad_item_id", unique: true, using: :btree
- add_index "ad_item_show_statistics", ["wx_uid"], name: "index_ad_item_show_statistics_on_wx_uid", using: :btree
- create_table "ad_items", force: :cascade do |t|
- t.integer "ad_position_id", limit: 4, null: false
- t.string "name", limit: 255, null: false
- t.text "img", limit: 65535, null: false
- t.text "click_url", limit: 65535
- t.integer "click_times", limit: 4, default: 0
- t.integer "show_times", limit: 4, default: 0
- t.datetime "expired_at"
- t.boolean "state", default: true
- t.integer "sort", limit: 4, default: 0
- t.datetime "created_at"
- t.datetime "updated_at"
- t.string "url", limit: 4096, default: ""
- t.integer "url_type", limit: 1, default: 0
- end
- add_index "ad_items", ["ad_position_id"], name: "index_ad_items_on_ad_position_id", using: :btree
- add_index "ad_items", ["sort"], name: "index_ad_items_on_sort", using: :btree
- create_table "ad_positions", force: :cascade do |t|
- t.string "code", limit: 255, null: false
- t.string "name", limit: 255, null: false
- t.string "remark", limit: 255, null: false
- t.integer "click_times", limit: 4, default: 0
- t.text "img", limit: 65535, null: false
- t.text "click_url", limit: 65535
- t.boolean "state", default: true
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "ad_positions", ["click_times"], name: "index_ad_positions_on_click_times", using: :btree
- add_index "ad_positions", ["code"], name: "index_ad_positions_on_code", unique: true, using: :btree
- create_table "addresses", force: :cascade do |t|
- t.integer "user_id", limit: 4
- t.string "contact", limit: 255
- t.string "tel", limit: 255
- t.string "address", limit: 255
- t.string "postcode", limit: 255
- t.string "province", limit: 255
- t.string "city", limit: 255
- t.string "district", limit: 255
- t.string "remark", limit: 255
- t.boolean "state", default: false
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "wx_user_id", limit: 4, default: 0, null: false
- end
- add_index "addresses", ["user_id"], name: "index_addresses_on_user_id", using: :btree
- add_index "addresses", ["wx_user_id"], name: "index_addresses_on_wx_user_id", using: :btree
- create_table "admin_departs", force: :cascade do |t|
- t.integer "admin_user_id", limit: 4, default: 0, null: false
- t.integer "depart_record_id", limit: 4, default: 0, null: false
- t.string "remark", limit: 256
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "admin_departs", ["admin_user_id"], name: "index_admin_departs_on_admin_user_id", using: :btree
- create_table "admin_permissions", force: :cascade do |t|
- t.string "model", limit: 255, null: false
- t.string "can", limit: 255, null: false
- end
- create_table "admin_permissions_admin_roles", force: :cascade do |t|
- t.integer "admin_role_id", limit: 4
- t.integer "admin_permission_id", limit: 4
- end
- add_index "admin_permissions_admin_roles", ["admin_role_id", "admin_permission_id"], name: "idx_admin_permissions_roles_id", using: :btree
- add_index "admin_permissions_admin_roles", ["admin_role_id", "admin_permission_id"], name: "idx_admin_roles_id", using: :btree
- create_table "admin_roles", force: :cascade do |t|
- t.string "name", limit: 255, null: false
- t.text "description", limit: 65535
- end
- create_table "admin_roles_admin_users", force: :cascade do |t|
- t.integer "admin_role_id", limit: 4
- t.integer "admin_user_id", limit: 4
- end
- create_table "admin_users", force: :cascade do |t|
- t.string "email", limit: 255, default: "", null: false
- t.string "encrypted_password", limit: 255, default: "", null: false
- t.string "name", limit: 255, default: "", null: false
- t.boolean "is_super_admin", default: false, null: false
- t.string "reset_password_token", limit: 255
- t.datetime "reset_password_sent_at"
- t.datetime "remember_created_at"
- t.integer "sign_in_count", limit: 4, default: 0
- t.datetime "current_sign_in_at"
- t.datetime "last_sign_in_at"
- t.string "current_sign_in_ip", limit: 255
- t.string "last_sign_in_ip", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "admin_users", ["email"], name: "index_admin_users_on_email", unique: true, using: :btree
- add_index "admin_users", ["reset_password_token"], name: "index_admin_users_on_reset_password_token", unique: true, using: :btree
- create_table "agent_applys", force: :cascade do |t|
- t.integer "happen_time", limit: 4, default: 0
- t.integer "intro_user_id", limit: 4, default: 0
- t.integer "wx_user_id", limit: 4, default: 0
- t.string "nickname", limit: 255
- t.string "mobile", limit: 128
- t.integer "depart", limit: 4, default: 0
- t.integer "com_user_id", limit: 4, default: 0
- t.integer "com_time", limit: 4, default: 0
- t.boolean "status", default: false
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "agent_applys", ["intro_user_id"], name: "idx_intro_user_id", using: :btree
- add_index "agent_applys", ["wx_user_id"], name: "idx_wx_user_id", using: :btree
- create_table "app_versions", force: :cascade do |t|
- t.datetime "created_at", precision: 3
- t.datetime "updated_at", precision: 3
- t.datetime "deleted_at", precision: 3
- t.string "app_type", limit: 255
- t.string "version", limit: 255
- t.string "version_code", limit: 255
- t.boolean "is_force"
- t.string "apk_url", limit: 255
- t.string "upgrade_point", limit: 255
- t.boolean "status"
- t.string "app_version", limit: 255
- end
- add_index "app_versions", ["deleted_at"], name: "idx_app_versions_deleted_at", using: :btree
- create_table "areas", force: :cascade do |t|
- t.integer "level", limit: 4
- t.integer "parent_code", limit: 8
- t.integer "area_code", limit: 8
- t.string "zip_code", limit: 6
- t.string "city_code", limit: 6
- t.string "name", limit: 50
- t.string "short_name", limit: 50
- t.string "merger_name", limit: 50
- t.float "lng", limit: 53
- t.float "lat", limit: 53
- t.datetime "created_at"
- t.datetime "updated_at"
- t.datetime "deleted_at"
- end
- add_index "areas", ["area_code"], name: "idx_areas_area_code", using: :btree
- add_index "areas", ["deleted_at"], name: "idx_areas_deleted_at", using: :btree
- add_index "areas", ["level"], name: "idx_areas_level", using: :btree
- add_index "areas", ["parent_code"], name: "idx_areas_parent_code", using: :btree
- create_table "article_cats", force: :cascade do |t|
- t.string "name", limit: 100, null: false
- t.integer "position", limit: 4
- t.string "ancestry", limit: 100
- t.boolean "state", default: false
- end
- add_index "article_cats", ["ancestry"], name: "index_article_cats_on_ancestry", using: :btree
- add_index "article_cats", ["name"], name: "index_article_cats_on_name", using: :btree
- add_index "article_cats", ["position"], name: "index_article_cats_on_position", using: :btree
- create_table "articles", force: :cascade do |t|
- t.string "title", limit: 100, null: false
- t.string "subtitle", limit: 100
- t.text "about", limit: 255
- t.text "content", limit: 4294967295, null: false
- t.text "url", limit: 65535
- t.string "cover", limit: 255
- t.string "source", limit: 100
- t.string "editor", limit: 100
- t.integer "click", limit: 4, default: 0
- t.integer "sort", limit: 4, default: 0
- t.integer "recommend", limit: 4
- t.boolean "state", default: false
- t.boolean "display_cover", default: false
- t.string "created_by", limit: 100
- t.integer "article_cat_id", limit: 4, null: false
- t.integer "agree", limit: 4, default: 0
- t.integer "disagree", limit: 4, default: 0
- t.string "tags", limit: 255
- t.string "seo_title", limit: 255
- t.string "seo_keyword", limit: 255
- t.string "seo_desc", limit: 255
- t.text "url_guide", limit: 65535
- t.string "share_benefit_desc", limit: 255
- t.boolean "show_cs_qrcode", default: false
- t.datetime "created_at"
- t.datetime "updated_at"
- t.string "s_title", limit: 255
- t.string "s_img", limit: 255
- end
- add_index "articles", ["article_cat_id"], name: "index_articles_on_article_cat_id", using: :btree
- add_index "articles", ["title"], name: "index_articles_on_title", using: :btree
- create_table "balance_orders", force: :cascade do |t|
- t.string "order_id", limit: 64, null: false
- t.integer "user_id", limit: 4, null: false
- t.integer "wx_user_id", limit: 4
- t.string "pay_way", limit: 20
- t.string "trade_no", limit: 64
- t.integer "paied_at", limit: 4
- t.integer "total_price", limit: 8, default: 0
- t.boolean "state", default: false
- t.string "remark", limit: 255
- t.string "balance_bank_card_no", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "paied_price", limit: 8, default: 0
- t.integer "calc_flag", limit: 4, default: 0
- t.integer "depart", limit: 4
- t.integer "present_flag", limit: 4, default: 0
- t.integer "update_user", limit: 4
- end
- add_index "balance_orders", ["depart"], name: "index_balance_orders_on_depart", using: :btree
- add_index "balance_orders", ["order_id"], name: "index_balance_orders_on_order_id", using: :btree
- add_index "balance_orders", ["user_id"], name: "index_balance_orders_on_user_id", using: :btree
- add_index "balance_orders", ["wx_user_id"], name: "index_balance_orders_on_wx_user_id", using: :btree
- create_table "balance_promotions", force: :cascade do |t|
- t.string "name", limit: 128
- t.datetime "begin_time"
- t.datetime "end_time"
- t.integer "min_total", limit: 4, default: 0
- t.integer "send_prod1", limit: 4, default: 0
- t.integer "send_nums1", limit: 4, default: 0
- t.integer "send_prod2", limit: 4, default: 0
- t.integer "send_nums2", limit: 4, default: 0
- t.integer "send_prod3", limit: 4, default: 0
- t.integer "send_nums3", limit: 4, default: 0
- t.boolean "is_enable", default: true
- t.integer "cash", limit: 4, default: 0
- t.integer "cent", limit: 4, default: 0
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "max_total", limit: 4, default: 0
- t.integer "depart", limit: 4, default: 0, null: false
- t.integer "is_more", limit: 1, default: 0
- end
- create_table "balances", force: :cascade do |t|
- t.integer "user_id", limit: 4
- t.integer "wx_user_id", limit: 4
- t.integer "count", limit: 4
- t.string "source", limit: 64
- t.string "relate_id", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "balances", ["relate_id"], name: "index_balances_on_relate_id", using: :btree
- add_index "balances", ["user_id"], name: "index_balances_on_user_id", using: :btree
- add_index "balances", ["wx_user_id"], name: "index_balances_on_wx_user_id", using: :btree
- create_table "base_configs", force: :cascade do |t|
- t.integer "buy_cash", limit: 4, default: 0, null: false
- t.integer "send_cash", limit: 4, default: 0, null: false
- t.integer "cash_award", limit: 4, default: 0, null: false
- t.integer "order_limit", limit: 4, default: 0, null: false
- t.integer "freight", limit: 4, default: 0, null: false
- t.integer "user_apply", limit: 4, default: 0, null: false
- t.integer "user_cash", limit: 4, default: 0, null: false
- t.integer "user_award", limit: 4, default: 0, null: false
- t.integer "agent_apply", limit: 4, default: 0, null: false
- t.integer "agent_cash", limit: 4, default: 0, null: false
- t.integer "agent_award", limit: 4, default: 0, null: false
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- create_table "base_details", force: :cascade do |t|
- t.string "order_no", limit: 200, default: "0"
- t.integer "product_id", limit: 4, default: 0
- t.integer "dt_id", limit: 4, default: 0
- t.integer "order_id", limit: 4, default: 0
- t.integer "is_zeng", limit: 1
- t.string "size_name", limit: 200
- t.string "color_name", limit: 200
- t.integer "nums", limit: 4, default: 0
- t.integer "price", limit: 4, default: 0
- t.string "product_name", limit: 200
- t.integer "depart", limit: 4
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "link_flag", limit: 4, default: 0
- t.string "product_no", limit: 128
- t.string "order_status", limit: 64
- end
- create_table "bind_users", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.string "user_no", limit: 255
- t.string "nickname", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "bind_users", ["wx_uid"], name: "index_bind_users_on_wx_uid", using: :btree
- create_table "carts", force: :cascade do |t|
- t.integer "user_id", limit: 8, default: 0
- t.integer "wx_user_id", limit: 8, default: 0
- t.integer "product_id", limit: 8, default: 0
- t.integer "nums", limit: 8, default: 0
- t.boolean "is_buy", default: true
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- create_table "cash_balances", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.integer "count", limit: 4, null: false
- t.string "source", limit: 64
- t.string "relate_id", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- t.boolean "profit_flag", default: false, null: false
- t.string "trade_no", limit: 255, default: "", null: false
- end
- add_index "cash_balances", ["wx_uid"], name: "index_cash_balances_on_wx_uid", using: :btree
- create_table "cent0_balances", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.integer "count", limit: 4, null: false
- t.string "source", limit: 64
- t.string "relate_id", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "cent0_balances", ["wx_uid"], name: "index_cent0_balances_on_wx_uid", using: :btree
- create_table "cent1_balances", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.integer "count", limit: 4, null: false
- t.string "source", limit: 64
- t.string "relate_id", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "cent1_balances", ["wx_uid"], name: "index_cent1_balances_on_wx_uid", using: :btree
- create_table "cent2_balances", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.integer "count", limit: 4, null: false
- t.string "source", limit: 64
- t.string "relate_id", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "cent2_balances", ["wx_uid"], name: "index_cent2_balances_on_wx_uid", using: :btree
- create_table "cent3_balances", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.integer "count", limit: 4, null: false
- t.string "source", limit: 64
- t.string "relate_id", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "cent3_balances", ["wx_uid"], name: "index_cent3_balances_on_wx_uid", using: :btree
- create_table "cent4_balances", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.integer "count", limit: 4, null: false
- t.string "source", limit: 64
- t.string "relate_id", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "cent4_balances", ["wx_uid"], name: "index_cent4_balances_on_wx_uid", using: :btree
- create_table "cent5_balances", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.integer "count", limit: 4, null: false
- t.string "source", limit: 64
- t.string "relate_id", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "cent5_balances", ["wx_uid"], name: "index_cent5_balances_on_wx_uid", using: :btree
- create_table "cent6_balances", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.integer "count", limit: 4, null: false
- t.string "source", limit: 64
- t.string "relate_id", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "cent6_balances", ["wx_uid"], name: "index_cent6_balances_on_wx_uid", using: :btree
- create_table "cent7_balances", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.integer "count", limit: 4, null: false
- t.string "source", limit: 64
- t.string "relate_id", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "cent7_balances", ["wx_uid"], name: "index_cent7_balances_on_wx_uid", using: :btree
- create_table "cent8_balances", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.integer "count", limit: 4, null: false
- t.string "source", limit: 64
- t.string "relate_id", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "cent8_balances", ["wx_uid"], name: "index_cent8_balances_on_wx_uid", using: :btree
- create_table "cent9_balances", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.integer "count", limit: 4, null: false
- t.string "source", limit: 64
- t.string "relate_id", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "cent9_balances", ["wx_uid"], name: "index_cent9_balances_on_wx_uid", using: :btree
- create_table "cent_awards", force: :cascade do |t|
- t.integer "count", limit: 4, null: false
- t.string "c_type", limit: 64
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "cent_awards", ["c_type"], name: "index_cent_awards_on_c_type", using: :btree
- create_table "cent_balances", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.integer "count", limit: 4, null: false
- t.string "source", limit: 64
- t.string "relate_id", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "cent_balances", ["wx_uid"], name: "index_cent_balances_on_wx_uid", using: :btree
- create_table "channel_qrcode_results", force: :cascade do |t|
- t.string "mp_openid", limit: 255, default: "0"
- t.integer "channel_qrcode_id", limit: 4
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- end
- add_index "channel_qrcode_results", ["channel_qrcode_id"], name: "index_channel_qrcode_results_on_channel_qrcode_id", using: :btree
- add_index "channel_qrcode_results", ["mp_openid", "channel_qrcode_id"], name: "index_channel_qrcode_results_on_openid_and_channel_qrcode_id", unique: true, using: :btree
- add_index "channel_qrcode_results", ["mp_openid"], name: "index_channel_qrcode_results_on_openid", using: :btree
- create_table "channel_qrcodes", force: :cascade do |t|
- t.integer "wx_gongzhonghao_id", limit: 4, null: false
- t.integer "parent_sign_up_channel_id", limit: 4
- t.integer "scene_id", limit: 4, default: 0
- t.string "scene_str", limit: 64
- t.boolean "is_permanent", default: false
- t.text "remark", limit: 65535, null: false
- t.text "qrcode_img", limit: 65535
- t.datetime "expired_at"
- t.integer "scan_times", limit: 4, default: 0
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.integer "push_after_sub_id", limit: 4, default: 0
- t.integer "ad_cost", limit: 4, default: 0
- end
- add_index "channel_qrcodes", ["expired_at"], name: "index_channel_qrcodes_on_expired_at", using: :btree
- create_table "ckeditor_assets", force: :cascade do |t|
- t.string "data_file_name", limit: 255, null: false
- t.string "data_content_type", limit: 255
- t.integer "data_file_size", limit: 4
- t.integer "assetable_id", limit: 4
- t.string "assetable_type", limit: 30
- t.string "type", limit: 30
- t.integer "width", limit: 4
- t.integer "height", limit: 4
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "ckeditor_assets", ["assetable_type", "assetable_id"], name: "idx_ckeditor_assetable", using: :btree
- add_index "ckeditor_assets", ["assetable_type", "type", "assetable_id"], name: "idx_ckeditor_assetable_type", using: :btree
- create_table "commend_words", force: :cascade do |t|
- t.integer "sort", limit: 4
- t.string "title", limit: 255
- t.boolean "state", default: false
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- create_table "common_use_limits", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.boolean "is_limit_up_benefit_list", default: false
- t.boolean "is_effect", default: false
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "common_use_limits", ["wx_uid"], name: "index_common_use_limits_on_wx_uid", using: :btree
- create_table "delete_user", force: :cascade do |t|
- t.text "result", limit: 65535
- t.integer "user_id", limit: 8
- t.text "wx_user", limit: 65535
- t.datetime "created_at", precision: 3
- t.datetime "updated_at", precision: 3
- end
- create_table "depart_records", force: :cascade do |t|
- t.integer "wx_user_id", limit: 4, default: 0, null: false
- t.string "name", limit: 255
- t.text "inner_no", limit: 65535
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- t.string "pick_title", limit: 128
- t.string "pick_address", limit: 128
- t.boolean "pick", default: false
- end
- add_index "depart_records", ["wx_user_id"], name: "index_depart_records_on_wx_user_id", using: :btree
- create_table "depart_records_balance_promotions", force: :cascade do |t|
- t.integer "balance_promotion_id", limit: 4
- t.integer "depart_record_id", limit: 4
- end
- add_index "depart_records_balance_promotions", ["balance_promotion_id", "depart_record_id"], name: "idx_balance_pomotion_d_r_id", using: :btree
- create_table "depart_records_group_messages", force: :cascade do |t|
- t.integer "group_message_id", limit: 4
- t.integer "depart_record_id", limit: 4
- end
- add_index "depart_records_group_messages", ["group_message_id", "depart_record_id"], name: "idx_group_message_id", using: :btree
- create_table "depart_records_live_broads", force: :cascade do |t|
- t.integer "live_broad_id", limit: 4
- t.integer "depart_record_id", limit: 4
- end
- add_index "depart_records_live_broads", ["live_broad_id", "depart_record_id"], name: "idx_live_broad_id", using: :btree
- create_table "depart_records_products", force: :cascade do |t|
- t.integer "product_id", limit: 4
- t.integer "depart_record_id", limit: 4
- end
- add_index "depart_records_products", ["product_id", "depart_record_id"], name: "idx_product_id", using: :btree
- create_table "depart_records_promotions", force: :cascade do |t|
- t.integer "promotion_id", limit: 4
- t.integer "depart_record_id", limit: 4
- end
- add_index "depart_records_promotions", ["promotion_id", "depart_record_id"], name: "idx_pomotion_d_r_id", using: :btree
- create_table "depart_records_shop_promotions", force: :cascade do |t|
- t.integer "shop_promotion_id", limit: 4
- t.integer "depart_record_id", limit: 4
- end
- add_index "depart_records_shop_promotions", ["shop_promotion_id", "depart_record_id"], name: "idx_shop_pomotion_d_r_id", using: :btree
- create_table "economic_statics", force: :cascade do |t|
- t.datetime "begin_time"
- t.integer "balance", limit: 4, default: 0, null: false
- t.integer "cash_balance", limit: 4, default: 0, null: false
- t.integer "cent", limit: 4, default: 0, null: false
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- create_table "employ_static_foods", force: :cascade do |t|
- t.datetime "created_at", precision: 3
- t.datetime "updated_at", precision: 3
- t.string "food_date", limit: 191
- t.integer "employ_id", limit: 8
- t.integer "source", limit: 2
- t.integer "nums", limit: 8
- t.integer "cancel_nums", limit: 8
- t.boolean "single"
- t.integer "total", limit: 8
- t.string "employ_name", limit: 191
- t.integer "food_buy_id", limit: 8
- t.integer "status", limit: 8
- end
- create_table "employs", force: :cascade do |t|
- t.string "mobile", limit: 100
- t.string "user_name", limit: 100
- t.datetime "created_at", precision: 3
- t.datetime "updated_at", precision: 3
- t.integer "wx_user_id", limit: 8
- end
- create_table "express_companys", force: :cascade do |t|
- t.string "express_code", limit: 128, default: "", null: false
- t.string "express_company", limit: 128, default: "", null: false
- t.datetime "create_time", null: false
- t.datetime "update_time", null: false
- end
- create_table "file_users", force: :cascade do |t|
- t.datetime "created_at", precision: 3
- t.datetime "updated_at", precision: 3
- t.datetime "deleted_at", precision: 3
- t.integer "user_id", limit: 8
- t.integer "company_id", limit: 8
- t.string "type", limit: 191
- t.string "name", limit: 255
- t.boolean "folder"
- t.integer "folder_id", limit: 8
- t.string "pinyin", limit: 191
- t.string "fist_pinyin", limit: 191
- t.integer "file_id", limit: 8
- end
- add_index "file_users", ["company_id"], name: "idx_file_users_company_id", using: :btree
- add_index "file_users", ["deleted_at"], name: "idx_file_users_deleted_at", using: :btree
- add_index "file_users", ["file_id"], name: "idx_file_users_file_id", using: :btree
- add_index "file_users", ["fist_pinyin"], name: "idx_file_users_fist_pinyin", using: :btree
- add_index "file_users", ["folder"], name: "idx_file_users_folder", using: :btree
- add_index "file_users", ["folder_id"], name: "idx_file_users_folder_id", using: :btree
- add_index "file_users", ["pinyin"], name: "idx_file_users_pinyin", using: :btree
- add_index "file_users", ["type"], name: "idx_file_users_type", using: :btree
- add_index "file_users", ["user_id"], name: "idx_file_users_user_id", using: :btree
- create_table "files", force: :cascade do |t|
- t.datetime "created_at", precision: 3
- t.string "path", limit: 255
- t.string "hash", limit: 191
- t.string "mime", limit: 191
- t.string "ext", limit: 191
- t.string "type", limit: 191
- t.integer "size", limit: 8
- end
- add_index "files", ["ext"], name: "idx_files_ext", using: :btree
- add_index "files", ["hash"], name: "idx_files_hash", using: :btree
- add_index "files", ["mime"], name: "idx_files_mime", using: :btree
- add_index "files", ["type"], name: "idx_files_type", using: :btree
- create_table "food_forbid_date", force: :cascade do |t|
- t.date "forbid_date"
- t.integer "source", limit: 4
- t.datetime "created_at", precision: 3
- t.datetime "updated_at", precision: 3
- end
- create_table "food_unsubs", force: :cascade do |t|
- t.datetime "created_at", precision: 3
- t.datetime "updated_at", precision: 3
- t.string "food_date", limit: 191
- t.integer "source", limit: 8
- t.integer "employ_id", limit: 8
- t.string "employ_name", limit: 191
- t.integer "nums", limit: 8
- t.integer "total", limit: 8
- t.string "remark", limit: 191
- t.boolean "status", default: false
- end
- create_table "group_message_records", force: :cascade do |t|
- t.integer "wx_user_id", limit: 4, default: 0
- t.string "mobile", limit: 64
- t.string "group_message_id", limit: 128, default: "0"
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "flag", limit: 4, default: 0, null: false
- end
- add_index "group_message_records", ["mobile"], name: "idx_mobile", using: :btree
- create_table "group_messages", force: :cascade do |t|
- t.integer "depart_record_id", limit: 4, default: 0
- t.string "code", limit: 64
- t.string "name", limit: 128, default: "0"
- t.string "keyword1", limit: 128
- t.string "keyword2", limit: 128
- t.string "keyword3", limit: 128
- t.integer "count", limit: 4
- t.string "remark", limit: 128
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "group_messages", ["code"], name: "idx_code", using: :btree
- create_table "invite_benefit_orders", force: :cascade do |t|
- t.integer "benefit_wx_uid", limit: 4, null: false
- t.integer "wx_uid", limit: 4, null: false
- t.integer "ind_wx_uid", limit: 4, null: false
- t.integer "count", limit: 4, null: false
- t.integer "amount", limit: 4, null: false
- t.string "source", limit: 64
- t.string "relate_id", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- t.boolean "is_enter_balance", default: false, null: false
- t.datetime "enter_time"
- end
- add_index "invite_benefit_orders", ["benefit_wx_uid"], name: "index_invite_benefit_orders_on_benefit_wx_uid", using: :btree
- create_table "jwts", force: :cascade do |t|
- t.datetime "created_at", precision: 3
- t.datetime "expires_at", precision: 3
- t.integer "user_id", limit: 8
- t.string "uuid", limit: 255
- t.integer "company", limit: 8
- end
- add_index "jwts", ["company"], name: "idx_jwts_company", using: :btree
- add_index "jwts", ["user_id"], name: "idx_jwts_user_id", using: :btree
- create_table "key_word_pushs", force: :cascade do |t|
- t.string "key_word", limit: 255
- t.string "push_type", limit: 255, null: false
- t.string "push_title", limit: 255
- t.string "cover", limit: 255
- t.string "word", limit: 255
- t.string "url", limit: 255
- t.string "remark", limit: 255, null: false
- t.integer "wx_gongzhonghao_id", limit: 4
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "key_word_pushs", ["key_word"], name: "index_key_word_pushs_on_key_word", using: :btree
- create_table "list_files", force: :cascade do |t|
- t.string "order_no", limit: 255
- t.string "order_status", limit: 128
- t.datetime "paied_date"
- t.datetime "paied_date_end"
- t.integer "paied_time", limit: 4, default: 0
- t.integer "depart", limit: 4, default: 0
- t.string "list_file", limit: 255
- t.boolean "status", default: false
- t.datetime "created_at"
- t.datetime "updated_at"
- t.string "line_file", limit: 128, default: "", null: false
- t.string "pdf_file", limit: 128, default: "", null: false
- end
- create_table "live_awards", force: :cascade do |t|
- t.string "openid", limit: 256
- t.integer "wx_user_id", limit: 4, default: 0
- t.string "remark", limit: 256
- t.integer "room_id", limit: 4, default: 0
- t.integer "prod1", limit: 4, default: 0
- t.integer "nums1", limit: 4, default: 0
- t.integer "prod2", limit: 4, default: 0
- t.integer "nums2", limit: 4, default: 0
- t.integer "prod3", limit: 4, default: 0
- t.integer "nums3", limit: 4, default: 0
- t.integer "cash", limit: 4, default: 0
- t.integer "cent", limit: 4, default: 0
- t.string "address", limit: 256
- t.string "contact", limit: 256
- t.string "tel", limit: 256
- t.boolean "status", default: false
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "live_awards", ["wx_user_id"], name: "index_live_awards_on_wx_user_id", using: :btree
- create_table "live_broads", force: :cascade do |t|
- t.string "title", limit: 128, null: false
- t.string "cover", limit: 256
- t.integer "room_id", limit: 4, default: 0, null: false
- t.datetime "begin_time"
- t.datetime "end_time"
- t.boolean "show", default: false
- t.string "remark", limit: 256
- t.integer "recommend", limit: 4, default: 0, null: false
- t.datetime "created_at"
- t.datetime "updated_at"
- t.string "rank_strs", limit: 255, default: ""
- end
- add_index "live_broads", ["room_id"], name: "index_live_broads_on_room_id", using: :btree
- create_table "main_economics", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.integer "cent", limit: 4, null: false
- t.boolean "is_wrong", default: false
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "main_economics", ["wx_uid"], name: "index_main_economics_on_wx_uid", using: :btree
- create_table "merchant_user_relations", force: :cascade do |t|
- t.integer "merchant_id", limit: 4, null: false
- t.integer "user_id", limit: 4, null: false
- t.boolean "is_effect", default: false
- t.datetime "created_at"
- t.datetime "updated_at"
- t.boolean "is_super_admin", default: false
- t.text "manage_product_ids", limit: 65535
- end
- add_index "merchant_user_relations", ["merchant_id"], name: "index_merchant_user_relations_on_merchant_id", using: :btree
- add_index "merchant_user_relations", ["user_id"], name: "index_merchant_user_relations_on_user_id", using: :btree
- create_table "merchants", force: :cascade do |t|
- t.integer "user_id", limit: 4
- t.string "name", limit: 100
- t.string "contact", limit: 16
- t.datetime "created_at"
- t.datetime "updated_at"
- t.string "tel", limit: 20
- t.string "payee", limit: 64, null: false
- t.string "bank_card_no", limit: 64, null: false
- t.string "bank_name", limit: 64, null: false
- t.string "back_voucher", limit: 100, null: false
- end
- add_index "merchants", ["user_id"], name: "index_wx_users_on_user_id", using: :btree
- create_table "navigate_icon_configs", force: :cascade do |t|
- t.string "name", limit: 10, default: "", null: false
- t.integer "sort", limit: 4, default: 1, null: false
- t.string "url", limit: 4096, default: "", null: false
- t.integer "url_type", limit: 1, default: 0
- t.string "cover", limit: 255
- t.boolean "state", default: true, null: false
- t.string "remark", limit: 225, default: ""
- t.integer "product_cat_index", limit: 4, default: 0, null: false
- t.boolean "app_state", default: false, null: false
- end
- create_table "order_details", force: :cascade do |t|
- t.string "order_no", limit: 200, default: "0"
- t.integer "product_id", limit: 4, default: 0
- t.integer "nums", limit: 4, default: 0
- t.integer "unit_robo_balance_price", limit: 4
- t.integer "price", limit: 4, default: 0
- t.string "product_name", limit: 200
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "order_id", limit: 4, default: 0
- t.boolean "is_zeng", default: false
- t.boolean "is_delete"
- t.string "size_name", limit: 128
- t.string "color_name", limit: 128
- t.integer "depart", limit: 4
- t.boolean "commend", default: false
- t.integer "relate_product_id", limit: 4, default: 0, null: false
- t.string "product_no", limit: 128
- t.integer "link_flag", limit: 4, default: 0
- t.integer "pv", limit: 4, default: 0
- t.string "order_status", limit: 64
- t.integer "silver", limit: 4, default: 0
- t.integer "dis_amount", limit: 4, default: 0
- end
- add_index "order_details", ["order_id"], name: "index_orderId", using: :btree
- add_index "order_details", ["order_no"], name: "index_orderNo", using: :btree
- add_index "order_details", ["product_id"], name: "index_productId", using: :btree
- create_table "order_refunds", force: :cascade do |t|
- t.string "order_id", limit: 128
- t.integer "wx_user_id", limit: 4, default: 0
- t.string "transaction_id", limit: 256
- t.integer "total", limit: 4, default: 0
- t.integer "refund_fee", limit: 4, default: 0
- t.integer "refund_time", limit: 4, default: 0
- t.boolean "status", default: false
- t.string "remark", limit: 128
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "order_refunds", ["order_id"], name: "index_order_refunds_on_order_id", using: :btree
- create_table "order_static_details", force: :cascade do |t|
- t.date "begin_date"
- t.date "end_date"
- t.string "state", limit: 256
- t.boolean "is_send", default: true
- t.integer "product_id", limit: 8, default: 0
- t.integer "static_id", limit: 8, default: 0
- t.string "product_name", limit: 256
- t.integer "nums", limit: 8, default: 0
- t.integer "total", limit: 4, default: 0
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- create_table "order_statics", force: :cascade do |t|
- t.date "begin_date"
- t.date "end_date"
- t.string "state", limit: 256
- t.boolean "is_send", default: true
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- create_table "orders", force: :cascade do |t|
- t.string "order_id", limit: 255, null: false
- t.integer "order_type", limit: 1, default: 0
- t.integer "wx_user_id", limit: 4, default: 0, null: false
- t.integer "user_id", limit: 4, null: false
- t.integer "total_price", limit: 4, null: false
- t.integer "paied_price", limit: 4, default: 0
- t.integer "buy_price", limit: 4, default: 0
- t.integer "count", limit: 4, default: 0, null: false
- t.integer "paied_at", limit: 4, default: 0
- t.string "trade_no", limit: 255
- t.string "status", limit: 255
- t.string "pay_way", limit: 255
- t.string "tel", limit: 255
- t.string "address", limit: 255
- t.string "contact", limit: 255
- t.string "express_company", limit: 255
- t.string "express_order_no", limit: 255
- t.string "remark", limit: 255
- t.datetime "dispatch_time"
- t.datetime "created_at"
- t.datetime "updated_at"
- t.datetime "receive_time"
- t.string "order_remark", limit: 255
- t.string "source", limit: 255, default: "xcx"
- t.integer "freight", limit: 4, default: 0
- t.integer "calc_flag", limit: 4, default: 0, null: false
- t.datetime "paied_time"
- t.string "express_code", limit: 128, default: "", null: false
- t.integer "coupon_price", limit: 4, default: 0, null: false
- t.integer "cent_price", limit: 4, default: 0, null: false
- t.integer "depart", limit: 4
- t.integer "link_flag", limit: 4, default: 0
- t.integer "pv", limit: 4, default: 0
- t.integer "pick_way", limit: 4, default: 0
- t.integer "pick_dept", limit: 4, default: 0
- t.boolean "has_commission", default: false
- t.string "promotions", limit: 255
- t.string "normal_promotions", limit: 255
- t.string "not_promotion_amount", limit: 255
- t.integer "address_id", limit: 4, default: 0
- t.integer "dis_amount", limit: 4, default: 0
- t.integer "total_silver", limit: 4, default: 0
- t.integer "paied_silver", limit: 4, default: 0
- t.integer "paied_cash", limit: 4, default: 0
- end
- add_index "orders", ["address"], name: "index_orders_on_address", using: :btree
- add_index "orders", ["depart"], name: "index_orders_on_depart", using: :btree
- add_index "orders", ["order_id"], name: "index_orders_on_order_id", using: :btree
- add_index "orders", ["paied_time"], name: "index_orders_on_paied_at", using: :btree
- add_index "orders", ["user_id"], name: "index_orders_on_user_id", using: :btree
- add_index "orders", ["wx_user_id"], name: "index_orders_on_wx_user_id", using: :btree
- create_table "parent_signup_channels", force: :cascade do |t|
- t.string "name", limit: 255
- t.string "desc", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- create_table "pay_configs", force: :cascade do |t|
- t.integer "depart", limit: 4, default: 0, null: false
- t.string "pay_code", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "pay_configs", ["depart"], name: "index_pay_configs_on_depart", using: :btree
- create_table "pick_addresses", force: :cascade do |t|
- t.integer "wx_user_id", limit: 4
- t.string "contact", limit: 255
- t.string "tel", limit: 255
- t.string "remark", limit: 255
- t.boolean "state", default: false
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "pick_addresses", ["wx_user_id"], name: "index_pick_addresses_on_wx_user_id", using: :btree
- create_table "platform_categories", force: :cascade do |t|
- t.string "name", limit: 20, default: "", null: false
- t.integer "position", limit: 4, default: 1, null: false
- t.string "ancestry", limit: 20, default: ""
- t.string "platform", limit: 20, default: "", null: false
- t.string "url", limit: 4096, default: "", null: false
- t.boolean "state", default: true, null: false
- t.string "remark", limit: 225, default: "", null: false
- t.integer "product_id", limit: 4, default: 0, null: false
- t.string "cover", limit: 255
- t.integer "url_type", limit: 1, default: 0
- end
- add_index "platform_categories", ["ancestry"], name: "index_platform_categories_on_ancestry", using: :btree
- add_index "platform_categories", ["platform"], name: "index_platform_categories_on_platform", using: :btree
- add_index "platform_categories", ["position"], name: "index_platform_categories_on_position", using: :btree
- create_table "poster_qrcode_records", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.integer "parent_relate_id", limit: 4, null: false
- t.integer "relate_id", limit: 4, null: false
- t.string "ptype", limit: 255
- t.string "qrcode_url", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "scan_times", limit: 4, null: false
- end
- add_index "poster_qrcode_records", ["wx_uid"], name: "index_poster_qrcode_records_on_wx_uid", using: :btree
- create_table "poster_qrcode_scan_records", force: :cascade do |t|
- t.integer "poster_qrcode_id", limit: 4, null: false
- t.integer "wx_uid", limit: 4, null: false
- t.string "ip", limit: 32
- t.integer "scan_times", limit: 4, null: false
- t.datetime "scan_last_time"
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "poster_qrcode_scan_records", ["poster_qrcode_id"], name: "index_poster_qrcode_scan_records_on_poster_qrcode_id", using: :btree
- add_index "poster_qrcode_scan_records", ["wx_uid", "poster_qrcode_id"], name: "index_poster_qrcode_scan_records_on_wx_uid_and_poster_qrcode_id", unique: true, using: :btree
- add_index "poster_qrcode_scan_records", ["wx_uid"], name: "index_poster_qrcode_scan_records_on_wx_uid", using: :btree
- create_table "presents", force: :cascade do |t|
- t.integer "wx_user_id", limit: 4, default: 0
- t.integer "price", limit: 4, default: 0
- t.integer "total", limit: 4, default: 0
- t.integer "send_prod1", limit: 4, default: 0
- t.integer "send_nums1", limit: 4, default: 0
- t.boolean "status", default: false
- t.string "order_id", limit: 64
- t.string "source", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "presents", ["order_id"], name: "index_presents_on_order_id", using: :btree
- add_index "presents", ["wx_user_id"], name: "index_presents_on_wx_user_id", using: :btree
- create_table "product_attr_configs", force: :cascade do |t|
- t.integer "product_id", limit: 8, default: 0
- t.integer "attr_key_id", limit: 8, default: 0
- t.string "size_type", limit: 64
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "product_attr_configs", ["attr_key_id"], name: "index_product_attr_configs_on_attr_key_id", using: :btree
- add_index "product_attr_configs", ["product_id"], name: "index_product_attr_configs_on_product_id", using: :btree
- create_table "product_attr_keys", force: :cascade do |t|
- t.string "name", limit: 128
- t.boolean "status", default: true
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- create_table "product_attrs", force: :cascade do |t|
- t.integer "attr_key_id", limit: 8, default: 0
- t.string "name", limit: 500
- t.integer "recommend", limit: 8, default: 0
- t.boolean "status", default: true
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "product_attrs", ["attr_key_id"], name: "index_product_attrs_on_attr_key_id", using: :btree
- create_table "product_cats", force: :cascade do |t|
- t.string "name", limit: 20, null: false
- t.integer "position", limit: 4
- t.string "ancestry", limit: 20
- t.boolean "status", default: true
- t.boolean "cow_state", default: false
- end
- add_index "product_cats", ["ancestry"], name: "index_product_cats_on_ancestry", using: :btree
- add_index "product_cats", ["name"], name: "index_product_cats_on_name", using: :btree
- add_index "product_cats", ["position"], name: "index_product_cats_on_position", using: :btree
- create_table "product_commends", force: :cascade do |t|
- t.integer "wx_user_id", limit: 4, default: 0, null: false
- t.integer "product_id", limit: 4, default: 0, null: false
- t.string "order_id", limit: 256
- t.string "detail", limit: 256
- t.integer "score", limit: 4, default: 0, null: false
- t.boolean "is_enable", default: false
- t.boolean "is_top", default: false
- t.integer "recommend", limit: 4, default: 0, null: false
- t.string "remark", limit: 256
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "product_commends", ["product_id"], name: "index_product_commends_on_product_id", using: :btree
- add_index "product_commends", ["wx_user_id"], name: "index_product_commends_on_wx_user_id", using: :btree
- create_table "product_items", force: :cascade do |t|
- t.integer "product_id", limit: 4, default: 0
- t.string "title", limit: 255
- t.integer "item_id", limit: 4, default: 0
- t.string "item_title", limit: 255
- t.integer "nums", limit: 4, default: 0
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- create_table "product_pictures", force: :cascade do |t|
- t.string "product_id", limit: 20, null: false
- t.string "img", limit: 255, null: false
- t.integer "pic_type", limit: 1, default: 0
- t.integer "sort", limit: 4, default: 0
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "product_pictures", ["product_id"], name: "index_pictures_on_product_id", using: :btree
- create_table "product_sale_subjects", force: :cascade do |t|
- t.string "product_ids", limit: 255, null: false
- t.string "background_img", limit: 255
- t.string "subject_title", limit: 255, null: false
- t.text "subject_desc", limit: 65535, null: false
- t.string "qrcode_tips", limit: 255
- t.string "qrcode_img", limit: 255
- t.string "share_title", limit: 50
- t.string "share_content", limit: 50
- t.string "share_img", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- t.boolean "is_prize_act", default: false, null: false
- t.datetime "open_prize_time"
- t.string "prize_number", limit: 20
- t.string "rule", limit: 255
- t.string "prize_name", limit: 50
- t.integer "click", limit: 4, default: 0
- end
- create_table "product_sale_types", force: :cascade do |t|
- t.string "name", limit: 128
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- create_table "product_warns", force: :cascade do |t|
- t.date "happen_time"
- t.integer "product_id", limit: 4, default: 0, null: false
- t.string "product_name", limit: 128, default: "", null: false
- t.string "product_type", limit: 128, default: "", null: false
- t.string "product_size", limit: 128, default: "", null: false
- t.integer "sale_90", limit: 4, default: 0, null: false
- t.integer "sale_30", limit: 4, default: 0, null: false
- t.integer "sale_10", limit: 4, default: 0, null: false
- t.integer "now_count", limit: 4, default: 0, null: false
- t.integer "product_cycle", limit: 4, default: 0, null: false
- t.integer "stock_cycle", limit: 4, default: 0, null: false
- t.integer "min_purchase", limit: 4, default: 0, null: false
- t.integer "history_day_sales", limit: 4, default: 0, null: false
- t.integer "recommend_count", limit: 4, default: 0, null: false
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- create_table "products", force: :cascade do |t|
- t.string "name", limit: 100, null: false
- t.integer "category_id", limit: 4
- t.text "detail", limit: 65535, null: false
- t.integer "price", limit: 4, null: false
- t.integer "robo_balance_price", limit: 4, null: false
- t.integer "mall_balance_price", limit: 4
- t.string "ptype", limit: 32, default: "direct_sale", null: false
- t.integer "buy_price", limit: 4, null: false
- t.integer "count", limit: 4, default: 1, null: false
- t.integer "recommend", limit: 4, default: 0
- t.boolean "status", default: false
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "merchant_id", limit: 4
- t.boolean "is_support_poor", default: false
- t.integer "virtual_sold_count", limit: 4, default: 0
- t.integer "purchase_limit_count", limit: 4, default: 0, null: false
- t.integer "single_purch_limit", limit: 4, default: 0, null: false
- t.integer "user_sale_price", limit: 4, default: 0, null: false
- t.string "share_content", limit: 50
- t.string "share_img", limit: 255
- t.datetime "seckill_start"
- t.datetime "seckill_end"
- t.integer "seckill_price", limit: 4
- t.datetime "deliver_stop_at"
- t.datetime "deliver_start_at"
- t.boolean "is_only_new", default: false
- t.string "specification", limit: 255
- t.string "no_delivery_area", limit: 255, default: "西藏、新疆、内蒙、宁夏、青海、甘肃"
- t.boolean "video_state", default: false
- t.string "video_url", limit: 100
- t.integer "sale_nums", limit: 4, default: 1, null: false
- t.integer "size_id", limit: 4, default: 0, null: false
- t.integer "color_id", limit: 4, default: 0, null: false
- t.integer "relate_product_id", limit: 4
- t.boolean "show_flag", default: false
- t.boolean "live", default: false
- t.boolean "package", default: false
- t.integer "product_cycle", limit: 4, default: 0, null: false
- t.integer "stock_cycle", limit: 4, default: 0, null: false
- t.integer "min_purchase", limit: 4, default: 0, null: false
- t.string "product_no", limit: 128, default: "", null: false
- t.integer "pv", limit: 4, default: 0
- t.integer "out_nums", limit: 4, default: 0
- t.string "key_words", limit: 255, default: "0"
- t.string "only_delivery_area", limit: 255, default: ""
- t.integer "silver", limit: 4, default: 0
- t.boolean "use_quan"
- t.integer "sale_zone", limit: 8, default: 0
- t.boolean "allow_app", default: false, null: false
- t.string "name_en", limit: 255
- t.string "name_ru", limit: 255
- t.string "name_tw", limit: 255
- t.text "detail_en", limit: 65535
- t.text "detail_ru", limit: 65535
- t.text "detail_tw", limit: 65535
- end
- add_index "products", ["allow_app"], name: "index_products_on_allow_app", using: :btree
- add_index "products", ["category_id"], name: "index_products_on_category_id", using: :btree
- add_index "products", ["color_id"], name: "index_products_on_color_id", using: :btree
- add_index "products", ["recommend"], name: "Recommend", using: :btree
- add_index "products", ["size_id"], name: "index_products_on_size_id", using: :btree
- create_table "products_promotions", force: :cascade do |t|
- t.integer "promotion_id", limit: 4
- t.integer "product_id", limit: 4
- end
- add_index "products_promotions", ["promotion_id", "product_id"], name: "idx_pomotion_products_id", using: :btree
- create_table "profit_users", force: :cascade do |t|
- t.integer "wx_user_id", limit: 4, default: 0, null: false
- t.string "openid", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "profit_users", ["wx_user_id"], name: "index_profit_users_on_wx_user_id", using: :btree
- create_table "promotions", force: :cascade do |t|
- t.string "name", limit: 128
- t.datetime "begin_time"
- t.datetime "end_time"
- t.boolean "is_first", default: true
- t.boolean "is_more", default: true
- t.integer "order_type", limit: 4, default: 0
- t.integer "cash", limit: 4
- t.integer "cent", limit: 4
- t.integer "min_total", limit: 4, default: 0
- t.integer "max_total", limit: 4, default: 0
- t.integer "prod1", limit: 4, default: 0
- t.integer "nums1", limit: 4, default: 0
- t.integer "prod2", limit: 4, default: 0
- t.integer "nums2", limit: 4, default: 0
- t.integer "prod3", limit: 4, default: 0
- t.integer "nums3", limit: 4, default: 0
- t.integer "send_prod1", limit: 4, default: 0
- t.integer "send_nums1", limit: 4, default: 0
- t.integer "send_prod2", limit: 4, default: 0
- t.integer "send_nums2", limit: 4, default: 0
- t.integer "send_prod3", limit: 4, default: 0
- t.integer "send_nums3", limit: 4, default: 0
- t.boolean "is_enable", default: true
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "prod4", limit: 4
- t.integer "nums4", limit: 4
- t.integer "prod5", limit: 4
- t.integer "nums5", limit: 4
- t.integer "send_prod4", limit: 4
- t.integer "send_nums4", limit: 4
- t.integer "send_prod5", limit: 4
- t.integer "send_nums5", limit: 4
- t.integer "depart", limit: 4, default: 0, null: false
- end
- add_index "promotions", ["begin_time"], name: "index_promotions_on_begin_time", using: :btree
- add_index "promotions", ["end_time"], name: "index_promotions_on_end_time", using: :btree
- create_table "push_after_subs", force: :cascade do |t|
- t.string "push_type", limit: 255, null: false
- t.string "push_title", limit: 255
- t.string "cover", limit: 255
- t.text "word", limit: 65535
- t.string "url", limit: 255
- t.string "remark", limit: 255, null: false
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- create_table "push_tmpl_records", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.datetime "push_time", null: false
- t.integer "temp_id", limit: 4, null: false
- end
- add_index "push_tmpl_records", ["wx_uid"], name: "index_push_tmpl_records_on_wx_uid", using: :btree
- create_table "push_tmpls", force: :cascade do |t|
- t.text "user_id", limit: 65535
- t.string "msg_type", limit: 255
- t.boolean "push_force", default: false
- t.integer "push_count", limit: 4, default: 0
- t.integer "click_count", limit: 4, default: 0
- t.string "first", limit: 255
- t.string "keyword1", limit: 255
- t.string "keyword2", limit: 255
- t.string "keyword3", limit: 255
- t.string "keyword4", limit: 255
- t.string "keyword5", limit: 255
- t.string "remark", limit: 255
- t.string "url", limit: 255
- t.integer "times", limit: 4, default: 0
- t.datetime "last_updated_at"
- t.integer "wx_gongzhonghao_id", limit: 4, default: 1
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- create_table "rails_admin_histories", force: :cascade do |t|
- t.text "message", limit: 65535
- t.string "username", limit: 255
- t.integer "item", limit: 4
- t.string "table", limit: 255
- t.integer "month", limit: 2
- t.integer "year", limit: 8
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "rails_admin_histories", ["item", "table", "month", "year"], name: "index_rails_admin_histories", using: :btree
- create_table "random_excel", force: :cascade do |t|
- t.string "user_no", limit: 256
- t.integer "rand_id", limit: 8, default: 0
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- create_table "recharge_cash_orders", force: :cascade do |t|
- t.string "order_id", limit: 64, null: false
- t.integer "user_id", limit: 4, null: false
- t.integer "wx_user_id", limit: 4
- t.string "pay_way", limit: 20
- t.string "trade_no", limit: 64
- t.integer "paied_at", limit: 4
- t.integer "total_price", limit: 8, default: 0
- t.boolean "state", default: false
- t.string "remark", limit: 255
- t.string "balance_bank_card_no", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "recharge_cash_orders", ["order_id"], name: "index_recharge_cash_orders_on_order_id", using: :btree
- add_index "recharge_cash_orders", ["user_id"], name: "index_recharge_cash_orders_on_user_id", using: :btree
- add_index "recharge_cash_orders", ["wx_user_id"], name: "index_recharge_cash_orders_on_wx_user_id", using: :btree
- create_table "reserve_act_orders", force: :cascade do |t|
- t.integer "act_id", limit: 4, null: false
- t.string "order_id", limit: 255, null: false
- t.integer "total_price", limit: 8, default: 0
- t.integer "paied_price", limit: 8, default: 0
- t.integer "user_id", limit: 4, null: false
- t.string "pay_way", limit: 20, default: "weixinpay"
- t.string "trade_no", limit: 64
- t.integer "paied_at", limit: 8
- t.boolean "state", default: false
- t.boolean "is_refunded", default: false
- t.boolean "is_deleted", default: false
- t.string "remark", limit: 255
- t.integer "returned_amount", limit: 4, default: 0
- t.integer "wx_user_id", limit: 4, null: false
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "reserve_act_orders", ["act_id"], name: "index_reserve_act_orders_on_act_id", using: :btree
- add_index "reserve_act_orders", ["order_id"], name: "index_reserve_act_orders_on_order_id", using: :btree
- create_table "reserve_acts", force: :cascade do |t|
- t.string "title", limit: 255, null: false
- t.datetime "start_at", null: false
- t.datetime "stop_at", null: false
- t.text "background_detail", limit: 65535
- t.string "remark", limit: 255
- t.string "guide_url", limit: 255
- t.string "guide_text", limit: 255
- t.string "url_type", limit: 20
- t.integer "state", limit: 4, default: 0
- t.string "share_title", limit: 255
- t.string "share_about", limit: 255
- t.string "share_img", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "join_amount", limit: 4, default: 0
- t.string "rule", limit: 255
- t.boolean "is_returned", default: false
- t.integer "return_count", limit: 4, default: 1, null: false
- t.string "guide_img", limit: 255
- end
- create_table "scale_devices", force: :cascade do |t|
- t.integer "wx_user_id", limit: 4
- t.string "mac_addr", limit: 100
- t.string "device_name", limit: 100
- t.datetime "created_at", precision: 3
- t.datetime "updated_at", precision: 3
- t.datetime "deleted_at", precision: 3
- t.boolean "active", default: true
- end
- add_index "scale_devices", ["deleted_at"], name: "idx_scale_devices_deleted_at", using: :btree
- create_table "scale_result", force: :cascade do |t|
- t.integer "wx_user_id", limit: 4
- t.text "result", limit: 65535
- t.datetime "created_at", precision: 3
- t.datetime "updated_at", precision: 3
- t.datetime "deleted_at", precision: 3
- t.integer "user_id", limit: 8
- end
- add_index "scale_result", ["deleted_at"], name: "idx_scale_result_deleted_at", using: :btree
- create_table "scale_users", force: :cascade do |t|
- t.datetime "created_at", precision: 3
- t.datetime "updated_at", precision: 3
- t.integer "wx_user_id", limit: 8
- t.integer "device_id", limit: 2
- t.integer "sex", limit: 2
- t.boolean "active", default: true
- t.string "avatar", limit: 256
- t.string "nick_name", limit: 100
- t.string "height", limit: 100
- t.string "weight", limit: 100, default: ""
- t.string "age", limit: 100
- t.string "target_weight", limit: 100
- t.string "birthday", limit: 191
- t.string "country", limit: 50
- t.string "race", limit: 50
- t.string "occupation", limit: 100
- end
- create_table "session", primary_key: "session_key", force: :cascade do |t|
- t.binary "session_data", limit: 65535
- t.integer "session_expiry", limit: 4, null: false
- end
- create_table "share_infos", force: :cascade do |t|
- t.string "share_code", limit: 255, null: false
- t.string "relate_id", limit: 255, null: false
- t.string "relate_parent", limit: 255, null: false
- t.integer "wx_user_id", limit: 4, default: 0
- t.string "share_to", limit: 20, null: false
- t.string "ip", limit: 255, null: false
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "share_times", limit: 4, default: 0
- t.datetime "share_latest_time"
- end
- add_index "share_infos", ["relate_id"], name: "index_share_infos_on_relate_id", using: :btree
- add_index "share_infos", ["relate_parent"], name: "index_share_infos_on_relate_parent", using: :btree
- add_index "share_infos", ["share_code"], name: "index_share_infos_on_share_code", using: :btree
- create_table "share_materials", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.string "image_1st", limit: 255
- t.string "image_2nd", limit: 255
- t.string "image_3rd", limit: 255
- t.string "image_4th", limit: 255
- t.string "image_5th", limit: 255
- t.string "image_6th", limit: 255
- t.string "image_7th", limit: 255
- t.string "image_8th", limit: 255
- t.boolean "is_published", default: false
- t.datetime "created_at"
- t.datetime "updated_at"
- t.string "image_9th", limit: 255
- t.string "m_type", limit: 20, default: "product", null: false
- t.integer "type_id", limit: 4, null: false
- t.text "material_text", limit: 65535
- end
- add_index "share_materials", ["wx_uid"], name: "index_share_materials_on_wx_uid", using: :btree
- create_table "shop_applications", force: :cascade do |t|
- t.integer "user_id", limit: 8, default: 0
- t.integer "wx_user_id", limit: 8, default: 0
- t.string "nickname", limit: 255
- t.string "name", limit: 255
- t.integer "mobile", limit: 8, default: 0
- t.integer "total", limit: 4, default: 0
- t.string "address", limit: 255
- t.string "remark", limit: 255
- t.string "image", limit: 255
- t.boolean "status", default: true
- t.datetime "pass_time"
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "calc_flag", limit: 4
- t.integer "depart", limit: 4
- t.integer "link_flag", limit: 4, default: 0
- end
- add_index "shop_applications", ["depart"], name: "index_shop_applications_on_depart", using: :btree
- add_index "shop_applications", ["pass_time"], name: "index_shop_applicatio_pass_time", using: :btree
- add_index "shop_applications", ["user_id"], name: "index_shop_applications_on_user_id", using: :btree
- add_index "shop_applications", ["wx_user_id"], name: "index_shop_applications_on_wx_user_id", using: :btree
- create_table "shop_promotions", force: :cascade do |t|
- t.string "name", limit: 128
- t.datetime "begin_time"
- t.datetime "end_time"
- t.integer "depart", limit: 4, default: 0, null: false
- t.integer "total", limit: 4, default: 0
- t.integer "cash", limit: 4, default: 0
- t.integer "cent", limit: 4, default: 0
- t.integer "send_prod1", limit: 4, default: 0
- t.integer "send_nums1", limit: 4, default: 0
- t.integer "send_prod2", limit: 4, default: 0
- t.integer "send_nums2", limit: 4, default: 0
- t.integer "send_prod3", limit: 4, default: 0
- t.integer "send_nums3", limit: 4, default: 0
- t.integer "send_prod4", limit: 4, default: 0
- t.integer "send_nums4", limit: 4, default: 0
- t.integer "send_prod5", limit: 4, default: 0
- t.integer "send_nums5", limit: 4, default: 0
- t.boolean "is_enable", default: true
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "shop_promotions", ["begin_time"], name: "index_shop_promotions_on_begin_time", using: :btree
- add_index "shop_promotions", ["end_time"], name: "index_shop_promotions_on_end_time", using: :btree
- add_index "shop_promotions", ["total"], name: "index_shop_promotions_on_total", using: :btree
- create_table "sign_up_channel_qrcode_results", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, default: 0, null: false
- t.integer "sign_up_channel_id", limit: 4
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "sign_up_channel_qrcode_results", ["sign_up_channel_id"], name: "index_sign_up_channel_qrcode_results_on_sign_up_channel_id", using: :btree
- add_index "sign_up_channel_qrcode_results", ["wx_uid", "sign_up_channel_id"], name: "idx_su_cq_result_wxuid_and_channel_id", unique: true, using: :btree
- add_index "sign_up_channel_qrcode_results", ["wx_uid"], name: "index_sign_up_channel_qrcode_results_on_wx_uid", using: :btree
- create_table "sign_up_channels", force: :cascade do |t|
- t.integer "parent_id", limit: 4, default: 0, null: false
- t.string "channel_value", limit: 255
- t.string "channel_url", limit: 255
- t.datetime "created_at", null: false
- t.datetime "updated_at", null: false
- t.string "url_image", limit: 255
- t.integer "scan_times", limit: 4, default: 0, null: false
- t.integer "invite_id", limit: 4, default: 0
- end
- create_table "silvers", force: :cascade do |t|
- t.integer "user_id", limit: 4
- t.integer "wx_user_id", limit: 4
- t.integer "count", limit: 4
- t.string "source", limit: 64
- t.string "relate_id", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "silvers", ["user_id"], name: "index_silvers_on_user_id", using: :btree
- add_index "silvers", ["wx_user_id"], name: "index_silvers_on_wx_user_id", using: :btree
- create_table "static_foods", force: :cascade do |t|
- t.datetime "created_at", precision: 3
- t.datetime "updated_at", precision: 3
- t.string "food_date", limit: 191
- t.integer "source", limit: 2
- t.integer "nums", limit: 8
- t.integer "pre_nums", limit: 8
- t.integer "single_nums", limit: 8
- t.integer "total", limit: 8
- t.integer "comfirm_nums", limit: 8
- end
- create_table "store_records", force: :cascade do |t|
- t.datetime "date_time"
- t.string "no", limit: 255
- t.integer "product_id", limit: 4, default: 0, null: false
- t.integer "order_type", limit: 4, default: 0, null: false
- t.integer "nums", limit: 4, default: 0, null: false
- t.string "operator", limit: 255
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- create_table "string_job_baks", force: :cascade do |t|
- t.string "random_string", limit: 128
- t.string "qr_string", limit: 255
- t.datetime "created_at", precision: 6, null: false
- t.datetime "updated_at", precision: 6, null: false
- end
- add_index "string_job_baks", ["random_string"], name: "index_string_jobs_on_random_string", unique: true, using: :btree
- create_table "string_jobs", force: :cascade do |t|
- t.string "random_string", limit: 128
- t.string "qr_string", limit: 255
- t.datetime "created_at", precision: 6, null: false
- t.datetime "updated_at", precision: 6, null: false
- end
- add_index "string_jobs", ["random_string"], name: "index_string_jobs_on_random_string", unique: true, using: :btree
- create_table "sys_cents", force: :cascade do |t|
- t.integer "user_id", limit: 4, null: false
- t.integer "cent", limit: 4, null: false
- t.integer "balance", limit: 4, null: false
- t.integer "cash", limit: 4, null: false
- end
- add_index "sys_cents", ["user_id"], name: "index_sys_cents_on_user_id", using: :btree
- create_table "sys_configs", force: :cascade do |t|
- t.string "code", limit: 64
- t.integer "config_type", limit: 4, default: 0
- t.string "code_value", limit: 64
- t.integer "sort", limit: 4, default: 0
- t.integer "depart_record_id", limit: 4, default: 0
- t.string "descrption", limit: 128
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "sys_configs", ["code"], name: "idx_code", using: :btree
- create_table "sys_users", force: :cascade do |t|
- t.integer "invite_id", limit: 4, null: false
- t.string "user_no", limit: 128
- t.string "invite_no", limit: 128
- t.string "dengji", limit: 128
- t.boolean "show_invite_mode", default: false
- t.integer "rank", limit: 4, null: false
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "sys_users", ["invite_id"], name: "index_sys_users_on_invite_id", using: :btree
- create_table "take_cash_orders", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.string "order_id", limit: 64, null: false
- t.string "trade_no", limit: 64
- t.integer "count", limit: 8, default: 0
- t.integer "pay_state", limit: 1, default: 0
- t.integer "audit_state", limit: 1, default: 0
- t.integer "paied_at", limit: 4
- t.string "remark", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- t.datetime "expc_pay_at"
- t.string "account_name", limit: 200
- t.string "bank_account", limit: 200, default: "", null: false
- t.string "bank_name", limit: 200
- t.integer "real_state", limit: 4
- t.integer "user_id", limit: 4
- t.string "tel", limit: 255
- t.integer "fee", limit: 4, default: 0
- t.integer "fei_count", limit: 4, default: 0
- t.integer "free_count", limit: 4, default: 0
- end
- add_index "take_cash_orders", ["order_id"], name: "index_take_cash_orders_on_order_id", using: :btree
- add_index "take_cash_orders", ["wx_uid"], name: "index_take_cash_orders_on_wx_uid", using: :btree
- create_table "tcm_exam_messages", force: :cascade do |t|
- t.datetime "created_at", precision: 3
- t.datetime "updated_at", precision: 3
- t.integer "exam_id", limit: 8
- t.integer "wx_user_id", limit: 8
- t.string "role", limit: 16
- t.string "message_type", limit: 32
- t.text "content", limit: 4294967295
- t.text "metadata", limit: 4294967295
- end
- add_index "tcm_exam_messages", ["exam_id"], name: "idx_tcm_exam_messages_exam", using: :btree
- add_index "tcm_exam_messages", ["exam_id"], name: "idx_tcm_exam_messages_exam_id", using: :btree
- add_index "tcm_exam_messages", ["wx_user_id"], name: "idx_tcm_exam_messages_wx_user", using: :btree
- add_index "tcm_exam_messages", ["wx_user_id"], name: "idx_tcm_exam_messages_wx_user_id", using: :btree
- create_table "tcm_exams", force: :cascade do |t|
- t.datetime "created_at", precision: 3
- t.datetime "updated_at", precision: 3
- t.integer "wx_user_id", limit: 8
- t.integer "scale_user_id", limit: 8
- t.string "model", limit: 64, default: "gemini-3-pro-preview"
- t.string "status", limit: 32, default: "pending"
- t.text "question_answers", limit: 4294967295
- t.text "observation_images", limit: 4294967295
- t.text "latest_scale_result", limit: 4294967295
- t.text "extra_note", limit: 4294967295
- t.text "ai_summary", limit: 4294967295
- t.text "report_html", limit: 4294967295
- t.string "language", limit: 16, default: "zh"
- t.text "raw_request", limit: 65535
- end
- add_index "tcm_exams", ["scale_user_id"], name: "idx_tcm_exams_scale_user", using: :btree
- add_index "tcm_exams", ["scale_user_id"], name: "idx_tcm_exams_scale_user_id", using: :btree
- add_index "tcm_exams", ["wx_user_id"], name: "idx_tcm_exams_wx_user", using: :btree
- add_index "tcm_exams", ["wx_user_id"], name: "idx_tcm_exams_wx_user_id", using: :btree
- create_table "three_wx_users", force: :cascade do |t|
- t.integer "invite_id", limit: 4, default: 0
- t.datetime "created_at"
- t.datetime "updated_at"
- t.text "intro_inner_no", limit: 65535
- t.string "intro_area", limit: 30
- t.integer "invite_rank", limit: 4
- t.integer "depart", limit: 4, default: 0, null: false
- t.integer "show_invite_mode", limit: 4, default: 0
- t.integer "intro_user_Id", limit: 4, default: 0
- end
- add_index "three_wx_users", ["intro_area"], name: "index_wx_users_on_intro_area", using: :btree
- add_index "three_wx_users", ["invite_id"], name: "index_wx_users_on_invite_id", using: :btree
- add_index "three_wx_users", ["invite_rank"], name: "index_wx_users_on_invite_rank", using: :btree
- create_table "update_orders", force: :cascade do |t|
- t.string "order_id", limit: 256
- t.string "express_order_no", limit: 256
- t.string "express_company", limit: 256
- t.boolean "status", default: true
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- create_table "user_perfomances", force: :cascade do |t|
- t.datetime "begin_date"
- t.datetime "end_date"
- t.integer "wx_user_id", limit: 4, default: 0
- t.string "nickname", limit: 256
- t.integer "order_perfomance", limit: 4, default: 0
- t.integer "shop_order_perfomance", limit: 4, default: 0
- t.integer "shop_perfomance", limit: 4, default: 0
- t.integer "balance_perfomance", limit: 4, default: 0
- t.integer "total", limit: 4, default: 0
- t.integer "nums", limit: 4, default: 0, null: false
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "user_perfomances", ["wx_user_id"], name: "index_user_perfomances_on_wx_user_id", using: :btree
- create_table "user_tokens", force: :cascade do |t|
- t.integer "user_id", limit: 4, null: false
- t.string "token", limit: 255, null: false
- t.integer "expire_time", limit: 4, default: 0, null: false
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "user_tokens", ["user_id"], name: "index_user_tokens_on_user_id", using: :btree
- create_table "users", force: :cascade do |t|
- t.string "tel", limit: 20
- t.string "country_code", limit: 10, default: "86", null: false
- t.string "email", limit: 191
- t.string "trade_pwd", limit: 255, default: "", null: false
- t.string "pwd", limit: 255, default: ""
- t.string "real_name", limit: 64
- t.string "identity_card", limit: 18
- t.boolean "is_certification", default: false
- t.date "birthday"
- t.string "nickname", limit: 100
- t.string "city", limit: 20
- t.string "country", limit: 20
- t.string "province", limit: 20
- t.integer "sex", limit: 1, default: 0
- t.integer "age", limit: 4
- t.string "head", limit: 255
- t.integer "invite_id", limit: 4
- t.integer "signup_channel_id", limit: 4, default: 0, null: false
- t.string "signup_ip", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- t.boolean "is_black_user", default: false
- t.string "bank_name", limit: 200
- t.string "bank_account", limit: 200
- t.string "account_name", limit: 200
- t.string "race", limit: 32
- t.string "occupation", limit: 100
- end
- add_index "users", ["invite_id"], name: "index_users_on_invite_id", using: :btree
- create_table "users_backup", force: :cascade do |t|
- t.string "tel", limit: 20
- t.string "trade_pwd", limit: 255, default: "", null: false
- t.string "pwd", limit: 255, default: ""
- t.string "real_name", limit: 64
- t.string "identity_card", limit: 18
- t.boolean "is_certification", default: false
- t.date "birthday"
- t.string "nickname", limit: 100
- t.string "city", limit: 20
- t.string "country", limit: 20
- t.string "province", limit: 20
- t.integer "sex", limit: 1, default: 0
- t.integer "age", limit: 4
- t.string "head", limit: 255
- t.integer "invite_id", limit: 4
- t.integer "signup_channel_id", limit: 4, default: 0, null: false
- t.string "signup_ip", limit: 255
- t.datetime "created_at"
- t.datetime "updated_at"
- t.boolean "is_black_user", default: false
- t.string "bank_name", limit: 200
- t.string "bank_account", limit: 200
- t.string "account_name", limit: 200
- end
- add_index "users_backup", ["invite_id"], name: "index_users_on_invite_id", using: :btree
- create_table "version_associations", force: :cascade do |t|
- t.integer "version_id", limit: 4
- t.string "foreign_key_name", limit: 255, null: false
- t.integer "foreign_key_id", limit: 4
- end
- add_index "version_associations", ["foreign_key_name", "foreign_key_id"], name: "index_version_associations_on_foreign_key", using: :btree
- add_index "version_associations", ["version_id"], name: "index_version_associations_on_version_id", using: :btree
- create_table "versions", force: :cascade do |t|
- t.string "item_type", limit: 191, null: false
- t.integer "item_id", limit: 4, null: false
- t.string "event", limit: 255, null: false
- t.string "whodunnit", limit: 255
- t.text "object", limit: 4294967295
- t.datetime "created_at"
- t.text "object_changes", limit: 4294967295
- t.integer "transaction_id", limit: 4
- end
- add_index "versions", ["item_type", "item_id"], name: "index_versions_on_item_type_and_item_id", using: :btree
- add_index "versions", ["transaction_id"], name: "index_versions_on_transaction_id", using: :btree
- create_table "welfare_orders", force: :cascade do |t|
- t.integer "welfare_id", limit: 4, null: false
- t.integer "product_id", limit: 4, null: false
- t.string "order_id", limit: 255, null: false
- t.integer "wx_uid", limit: 4, null: false
- t.integer "total_price", limit: 4, null: false
- t.integer "paied_price", limit: 4, default: 0
- t.integer "paied_at", limit: 4
- t.integer "state", limit: 1, default: 0
- t.string "trade_no", limit: 255
- t.string "remark", limit: 255
- t.integer "invite_wx_uid", limit: 4
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "welfare_orders", ["order_id"], name: "index_welfare_orders_on_order_id", using: :btree
- add_index "welfare_orders", ["welfare_id"], name: "index_welfare_orders_on_welfare_id", using: :btree
- add_index "welfare_orders", ["wx_uid"], name: "index_welfare_orders_on_wx_uid", using: :btree
- create_table "wx_event_items", force: :cascade do |t|
- t.integer "article_id", limit: 4, null: false
- t.string "name", limit: 100, null: false
- t.string "title", limit: 255
- t.boolean "use_title", default: false
- t.string "cover", limit: 255
- t.boolean "use_cover", default: false
- t.string "href", limit: 255
- t.boolean "use_href", default: false
- t.integer "position", limit: 4
- t.integer "click_times", limit: 4
- t.string "ancestry", limit: 100
- t.boolean "state", default: false
- end
- add_index "wx_event_items", ["ancestry"], name: "index_wx_event_items_on_ancestry", using: :btree
- create_table "wx_events", force: :cascade do |t|
- t.integer "wx_gongzhonghao_id", limit: 4, null: false
- t.string "return_type", limit: 4, null: false
- t.string "key", limit: 255
- t.integer "wx_event_item_id", limit: 4
- t.text "return_text_content", limit: 65535
- t.boolean "state", default: false
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "wx_events", ["key"], name: "index_wx_events_on_key", using: :btree
- add_index "wx_events", ["wx_gongzhonghao_id"], name: "index_wx_events_on_wx_gongzhonghao_id", using: :btree
- create_table "wx_form_ids", force: :cascade do |t|
- t.string "mp_openid", limit: 128
- t.string "openid", limit: 128
- t.string "form_id", limit: 100
- t.boolean "state", default: false
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "wx_form_ids", ["form_id"], name: "form_id", unique: true, using: :btree
- create_table "wx_gongzhonghaos", force: :cascade do |t|
- t.string "wx_hao", limit: 255, null: false
- t.string "wx_name", limit: 255, null: false
- t.string "wx_type", limit: 9, default: "service", null: false
- t.boolean "is_authed", default: false
- t.string "app_id", limit: 255, null: false
- t.string "app_secret", limit: 255
- t.string "token", limit: 255
- t.text "sub_return_text", limit: 65535
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "wx_gongzhonghaos", ["app_id"], name: "index_wx_gongzhonghaos_on_app_id", unique: true, using: :btree
- add_index "wx_gongzhonghaos", ["wx_hao"], name: "index_wx_gongzhonghaos_on_wx_hao", unique: true, using: :btree
- create_table "wx_menus", force: :cascade do |t|
- t.integer "wx_gongzhonghao_id", limit: 4, null: false
- t.string "name", limit: 255
- t.string "ancestry", limit: 64
- t.text "content", limit: 65535
- t.string "action", limit: 15, default: "view"
- t.datetime "created_at"
- t.string "key", limit: 255
- t.integer "position", limit: 4
- t.string "appid", limit: 255
- t.string "pagepath", limit: 255
- end
- add_index "wx_menus", ["ancestry"], name: "index_wx_menus_on_ancestry", using: :btree
- add_index "wx_menus", ["wx_gongzhonghao_id"], name: "index_wx_menus_on_wx_gongzhonghao_id", using: :btree
- create_table "wx_user_gongzhonghaos", force: :cascade do |t|
- t.integer "wx_user_id", limit: 4, null: false
- t.string "app_id", limit: 255, null: false
- t.string "gzh_open_id", limit: 64
- t.datetime "created_at"
- t.datetime "updated_at"
- t.boolean "subscribe"
- t.integer "subscribe_time", limit: 4
- t.integer "unsubscribe_time", limit: 4
- t.integer "last_conversation_at", limit: 4
- end
- add_index "wx_user_gongzhonghaos", ["app_id"], name: "index_wx_user_gongzhonghaos_on_app_id", using: :btree
- add_index "wx_user_gongzhonghaos", ["gzh_open_id"], name: "index_wx_user_gongzhonghaos_on_gzh_open_id", using: :btree
- add_index "wx_user_gongzhonghaos", ["wx_user_id"], name: "index_wx_user_gongzhonghaos_on_wx_user_id", unique: true, using: :btree
- create_table "wx_user_rank", force: :cascade do |t|
- t.datetime "created_at", precision: 3
- t.datetime "updated_at", precision: 3
- t.integer "rank", limit: 8, null: false
- t.string "rank_name", limit: 64, default: "", null: false
- t.integer "quota_5h", limit: 8, default: 0, null: false
- t.integer "quota_month", limit: 8, default: 0, null: false
- end
- add_index "wx_user_rank", ["rank"], name: "idx_wx_user_rank_rank", unique: true, using: :btree
- create_table "wx_users", force: :cascade do |t|
- t.integer "user_id", limit: 4
- t.integer "invite_id", limit: 4, default: 0
- t.string "mp_openid", limit: 64
- t.string "openid", limit: 255
- t.string "nickname", limit: 100
- t.string "unionid", limit: 64
- t.string "city", limit: 20
- t.string "country", limit: 20
- t.string "province", limit: 20
- t.integer "sex", limit: 1, default: 0
- t.string "head", limit: 255
- t.boolean "subscribe"
- t.boolean "is_regist", default: false
- t.integer "subscribe_time", limit: 4, default: 0
- t.integer "unsubscribe_time", limit: 4, default: 0
- t.integer "last_conversation_at", limit: 4, default: 0
- t.integer "channel_qrcode_id", limit: 4
- t.string "signup_ip", limit: 255
- t.string "invite_qrcode_url", limit: 255
- t.boolean "show_invite_mode", default: false
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "intro_user_id", limit: 4
- t.text "intro_inner_no", limit: 65535
- t.string "intro_area", limit: 3
- t.integer "depth", limit: 4, default: 0, null: false
- t.decimal "sale_group", precision: 20, scale: 2, null: false
- t.decimal "sale_group_sum", precision: 20, scale: 2, null: false
- t.decimal "sale_score", precision: 20, scale: 2
- t.decimal "sale_person", precision: 20, scale: 2
- t.integer "active_nums", limit: 4
- t.integer "rank", limit: 8, default: 0
- t.integer "partner_time", limit: 4, default: 0, null: false
- t.string "user_no", limit: 128
- t.integer "depart", limit: 4
- t.string "tel", limit: 20
- t.decimal "sale_shop", precision: 20, scale: 2
- t.decimal "sale_shop_sum", precision: 20, scale: 2
- t.decimal "sale_6", precision: 20, scale: 2, null: false
- t.decimal "sale_7", precision: 20, scale: 2, null: false
- t.string "tc_area", limit: 255, default: ""
- t.integer "tc_bl", limit: 4, default: 0
- t.integer "vip_rank", limit: 4, default: 1
- t.datetime "vip_end_date"
- end
- add_index "wx_users", ["depart"], name: "index_wx_users_on_depart", using: :btree
- add_index "wx_users", ["intro_area"], name: "index_wx_users_on_intro_area", using: :btree
- add_index "wx_users", ["invite_id"], name: "index_wx_users_on_invite_id", using: :btree
- add_index "wx_users", ["subscribe"], name: "index_wx_users_on_subscribe", using: :btree
- add_index "wx_users", ["user_id"], name: "index_wx_users_on_user_id", using: :btree
- create_table "wx_users_backup", force: :cascade do |t|
- t.integer "user_id", limit: 4
- t.integer "invite_id", limit: 4, default: 0
- t.string "mp_openid", limit: 64
- t.string "openid", limit: 64
- t.string "nickname", limit: 100
- t.string "unionid", limit: 64, null: false
- t.string "city", limit: 20
- t.string "country", limit: 20
- t.string "province", limit: 20
- t.integer "sex", limit: 1, default: 0
- t.string "head", limit: 255
- t.boolean "subscribe"
- t.boolean "is_regist", default: false
- t.integer "subscribe_time", limit: 4, default: 0
- t.integer "unsubscribe_time", limit: 4, default: 0
- t.integer "last_conversation_at", limit: 4, default: 0
- t.integer "channel_qrcode_id", limit: 4
- t.string "signup_ip", limit: 255
- t.string "invite_qrcode_url", limit: 255
- t.boolean "show_invite_mode", default: false
- t.datetime "created_at"
- t.datetime "updated_at"
- t.integer "intro_user_id", limit: 4
- t.text "intro_inner_no", limit: 65535
- t.string "intro_area", limit: 3
- t.integer "depth", limit: 4, default: 0, null: false
- t.decimal "sale_group", precision: 20, scale: 2, null: false
- t.decimal "sale_group_sum", precision: 20, scale: 2, null: false
- t.decimal "sale_score", precision: 20, scale: 2
- t.decimal "sale_person", precision: 20, scale: 2
- t.integer "active_nums", limit: 4
- t.integer "rank", limit: 8, default: 0
- t.integer "partner_time", limit: 4, default: 0, null: false
- t.string "user_no", limit: 128
- t.integer "depart", limit: 4
- t.string "tel", limit: 20
- t.decimal "sale_shop", precision: 20, scale: 2
- t.decimal "sale_shop_sum", precision: 20, scale: 2
- t.decimal "sale_6", precision: 20, scale: 2, null: false
- t.decimal "sale_7", precision: 20, scale: 2, null: false
- t.string "tc_area", limit: 255, default: ""
- t.integer "tc_bl", limit: 4, default: 0
- end
- add_index "wx_users_backup", ["channel_qrcode_id"], name: "index_wx_users_on_channel_qrcode_id", using: :btree
- add_index "wx_users_backup", ["depart"], name: "index_wx_users_on_depart", using: :btree
- add_index "wx_users_backup", ["intro_area"], name: "index_wx_users_on_intro_area", using: :btree
- add_index "wx_users_backup", ["invite_id"], name: "index_wx_users_on_invite_id", using: :btree
- add_index "wx_users_backup", ["last_conversation_at"], name: "index_wx_users_on_last_conversation_at", using: :btree
- add_index "wx_users_backup", ["mp_openid"], name: "index_wx_users_on_mp_openid", using: :btree
- add_index "wx_users_backup", ["subscribe"], name: "index_wx_users_on_subscribe", using: :btree
- add_index "wx_users_backup", ["unionid"], name: "index_wx_users_on_unionid", unique: true, using: :btree
- add_index "wx_users_backup", ["user_id"], name: "index_wx_users_on_user_id", using: :btree
- create_table "wxku_commodities", force: :cascade do |t|
- t.integer "product_id", limit: 4, null: false
- t.string "image_info_1", limit: 255
- t.string "image_info_2", limit: 255
- t.string "image_info_3", limit: 255
- t.string "image_info_4", limit: 255
- t.string "image_info_5", limit: 255
- t.string "category_info", limit: 255, default: "食品生鲜"
- t.string "official_category_info", limit: 255, default: "食品生鲜"
- t.string "url", limit: 255, default: "pages/start/start?scene="
- t.string "title", limit: 30
- t.string "sub_title", limit: 30
- t.string "brand", limit: 255, default: "拉比兔"
- t.integer "source", limit: 4, default: 1, null: false
- t.string "desc", limit: 300
- t.integer "min_price", limit: 4
- t.integer "max_price", limit: 4
- t.integer "min_ori_price", limit: 4
- t.integer "max_ori_price", limit: 4
- t.string "sale_status", limit: 255
- t.string "status_ticket", limit: 255
- t.integer "stock", limit: 4
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "wxku_commodities", ["product_id"], name: "index_wxku_commodities_on_product_id", using: :btree
- create_table "xcx_push_tmpl_records", force: :cascade do |t|
- t.integer "wx_uid", limit: 4, null: false
- t.datetime "push_time", null: false
- t.integer "temp_id", limit: 4, null: false
- end
- add_index "xcx_push_tmpl_records", ["wx_uid"], name: "index_xcx_push_tmpl_records_on_wx_uid", using: :btree
- create_table "xcx_push_tmpls", force: :cascade do |t|
- t.text "user_id", limit: 65535
- t.string "msg_type", limit: 255
- t.boolean "push_force", default: false
- t.string "emphasis_keyword", limit: 255
- t.string "keyword1", limit: 255
- t.string "keyword2", limit: 255
- t.string "keyword3", limit: 255
- t.string "keyword4", limit: 255
- t.string "keyword5", limit: 255
- t.string "page", limit: 255
- t.integer "times", limit: 4, default: 0
- t.datetime "last_updated_at"
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- create_table "xcx_versions", force: :cascade do |t|
- t.string "version", limit: 64, null: false
- t.string "desc", limit: 255
- t.boolean "state", default: false
- t.datetime "created_at"
- t.datetime "updated_at"
- end
- add_index "xcx_versions", ["version"], name: "index_xcx_versions_on_version", unique: true, using: :btree
- create_table "积分资料201130", id: false, force: :cascade do |t|
- t.string "user_id", limit: 255
- t.string "cent", limit: 255
- t.string "balance", limit: 255
- t.string "cash", limit: 255
- t.string "f5", limit: 255
- end
- end
|