You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
3.1 KiB
64 lines
3.1 KiB
# 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: 2023_09_01_094526) do
|
|
|
|
create_table "edu_settings", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", force: :cascade do |t|
|
|
t.string "name"
|
|
t.string "value"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
t.string "description"
|
|
t.index ["name"], name: "index_edu_settings_on_name", unique: true
|
|
end
|
|
|
|
create_table "tokens", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", force: :cascade do |t|
|
|
t.integer "user_id", comment: "用户id"
|
|
t.string "action", comment: "方式"
|
|
t.integer "status", default: 0, comment: "status 0=正常登陆1=正常退出登陆失效2=考试期间输入考试密码登录3=考试期间被挤出登录失效4=同一个浏览器登录导致失效5考试期间进入考试导致其他登录用户失效"
|
|
t.string "value", comment: "值"
|
|
t.string "ip"
|
|
t.string "browser", comment: "登录的游览器"
|
|
t.date "created_on"
|
|
end
|
|
|
|
create_table "user_actions", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", force: :cascade do |t|
|
|
t.integer "user_id", comment: "用户id"
|
|
t.string "action_type", comment: "操作方式"
|
|
t.integer "action_id", comment: "操作id"
|
|
t.string "ip", comment: "ip地址"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
end
|
|
|
|
create_table "users", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci", force: :cascade do |t|
|
|
t.string "login", comment: "登录账号"
|
|
t.string "password", comment: "密码"
|
|
t.string "email", comment: "邮箱"
|
|
t.string "salt", comment: "盐值"
|
|
t.string "nickname", comment: "昵称"
|
|
t.integer "status", default: 0, comment: "账号状态 0未激活 1已激活 2已禁用"
|
|
t.date "last_login_on", comment: "上次登录时间"
|
|
t.string "phone", comment: "手机号"
|
|
t.string "ID_number", comment: "身份证号"
|
|
t.datetime "created_at", null: false
|
|
t.datetime "updated_at", null: false
|
|
t.integer "admin", default: 0, comment: "管理员"
|
|
t.integer "identity", comment: "身份字段 0 老师 1学生 -1游客"
|
|
t.string "user_type"
|
|
t.index ["email"], name: "index_users_on_email", unique: true
|
|
t.index ["login"], name: "index_users_on_login", unique: true
|
|
t.index ["phone"], name: "index_users_on_phone", unique: true
|
|
end
|
|
|
|
end
|