数据统计功能(增删查改)
This commit is contained in:
parent
f9a507ec11
commit
11dfd8dbb2
|
@ -0,0 +1,3 @@
|
||||||
|
# Place all the behaviors and hooks related to the matching controller here.
|
||||||
|
# All this logic will automatically be available in application.js.
|
||||||
|
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
|
|
@ -0,0 +1,69 @@
|
||||||
|
body {
|
||||||
|
background-color: #fff;
|
||||||
|
color: #333;
|
||||||
|
font-family: verdana, arial, helvetica, sans-serif;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p, ol, ul, td {
|
||||||
|
font-family: verdana, arial, helvetica, sans-serif;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
pre {
|
||||||
|
background-color: #eee;
|
||||||
|
padding: 10px;
|
||||||
|
font-size: 11px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #000;
|
||||||
|
&:visited {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
div {
|
||||||
|
&.field, &.actions {
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#notice {
|
||||||
|
color: green;
|
||||||
|
}
|
||||||
|
|
||||||
|
.field_with_errors {
|
||||||
|
padding: 2px;
|
||||||
|
background-color: red;
|
||||||
|
display: table;
|
||||||
|
}
|
||||||
|
|
||||||
|
#error_explanation {
|
||||||
|
width: 450px;
|
||||||
|
border: 2px solid red;
|
||||||
|
padding: 7px;
|
||||||
|
padding-bottom: 0;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
h2 {
|
||||||
|
text-align: left;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 5px 5px 5px 15px;
|
||||||
|
font-size: 12px;
|
||||||
|
margin: -7px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
background-color: #c00;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
ul li {
|
||||||
|
font-size: 12px;
|
||||||
|
list-style: square;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
// Place all the styles related to the statistics controller here.
|
||||||
|
// They will automatically be included in application.css.
|
||||||
|
// You can use Sass (SCSS) here: http://sass-lang.com/
|
|
@ -0,0 +1,83 @@
|
||||||
|
class StatisticsController < ApplicationController
|
||||||
|
# GET /statistics
|
||||||
|
# GET /statistics.json
|
||||||
|
def index
|
||||||
|
@statistics = Statistic.all
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
format.html # index.html.erb
|
||||||
|
format.json { render json: @statistics }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# GET /statistics/1
|
||||||
|
# GET /statistics/1.json
|
||||||
|
def show
|
||||||
|
@statistic = Statistic.find(params[:id])
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
format.html # show.html.erb
|
||||||
|
format.json { render json: @statistic }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# GET /statistics/new
|
||||||
|
# GET /statistics/new.json
|
||||||
|
def new
|
||||||
|
@statistic = Statistic.new
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
format.html # new.html.erb
|
||||||
|
format.json { render json: @statistic }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# GET /statistics/1/edit
|
||||||
|
def edit
|
||||||
|
@statistic = Statistic.find(params[:id])
|
||||||
|
end
|
||||||
|
|
||||||
|
# POST /statistics
|
||||||
|
# POST /statistics.json
|
||||||
|
def create
|
||||||
|
@statistic = Statistic.new(params[:statistic])
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
if @statistic.save
|
||||||
|
format.html { redirect_to @statistic, notice: 'Statistic was successfully created.' }
|
||||||
|
format.json { render json: @statistic, status: :created, location: @statistic }
|
||||||
|
else
|
||||||
|
format.html { render action: "new" }
|
||||||
|
format.json { render json: @statistic.errors, status: :unprocessable_entity }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# PUT /statistics/1
|
||||||
|
# PUT /statistics/1.json
|
||||||
|
def update
|
||||||
|
@statistic = Statistic.find(params[:id])
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
if @statistic.update_attributes(params[:statistic])
|
||||||
|
format.html { redirect_to @statistic, notice: 'Statistic was successfully updated.' }
|
||||||
|
format.json { head :no_content }
|
||||||
|
else
|
||||||
|
format.html { render action: "edit" }
|
||||||
|
format.json { render json: @statistic.errors, status: :unprocessable_entity }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# DELETE /statistics/1
|
||||||
|
# DELETE /statistics/1.json
|
||||||
|
def destroy
|
||||||
|
@statistic = Statistic.find(params[:id])
|
||||||
|
@statistic.destroy
|
||||||
|
|
||||||
|
respond_to do |format|
|
||||||
|
format.html { redirect_to statistics_url }
|
||||||
|
format.json { head :no_content }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,2 @@
|
||||||
|
module StatisticsHelper
|
||||||
|
end
|
|
@ -0,0 +1,3 @@
|
||||||
|
class Statistic < ActiveRecord::Base
|
||||||
|
attr_accessible :description, :name, :status, :user_id
|
||||||
|
end
|
|
@ -22,6 +22,9 @@
|
||||||
<li class="navHomepageMenu fl">
|
<li class="navHomepageMenu fl">
|
||||||
<%= link_to "项目", user_project_community_path(User.current), :class => "c_white f16 db p10", :target => "_blank" %>
|
<%= link_to "项目", user_project_community_path(User.current), :class => "c_white f16 db p10", :target => "_blank" %>
|
||||||
</li>
|
</li>
|
||||||
|
<li class="navHomepageMenu fl">
|
||||||
|
<%= link_to "数据", statistics_path, :class => "c_white f16 db p10", :target => "_blank" %>
|
||||||
|
</li>
|
||||||
|
|
||||||
<% if hidden_unproject_infos %>
|
<% if hidden_unproject_infos %>
|
||||||
<li class="navHomepageMenu fl">
|
<li class="navHomepageMenu fl">
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
<%= form_for(@statistic) do |f| %>
|
||||||
|
<% if @statistic.errors.any? %>
|
||||||
|
<div id="error_explanation">
|
||||||
|
<h2><%= pluralize(@statistic.errors.count, "error") %> prohibited this statistic from being saved:</h2>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<% @statistic.errors.full_messages.each do |msg| %>
|
||||||
|
<li><%= msg %></li>
|
||||||
|
<% end %>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<div class="field">
|
||||||
|
<%= f.label :name %><br />
|
||||||
|
<%= f.text_field :name %>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<%= f.label :description %><br />
|
||||||
|
<%= f.text_field :description %>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<%= f.label :user_id %><br />
|
||||||
|
<%= f.number_field :user_id %>
|
||||||
|
</div>
|
||||||
|
<div class="field">
|
||||||
|
<%= f.label :status %><br />
|
||||||
|
<%= f.number_field :status %>
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<%= f.submit %>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<h1>Editing statistic</h1>
|
||||||
|
|
||||||
|
<%= render 'form' %>
|
||||||
|
|
||||||
|
<%= link_to 'Show', @statistic %> |
|
||||||
|
<%= link_to 'Back', statistics_path %>
|
|
@ -0,0 +1,29 @@
|
||||||
|
<h1>Listing statistics</h1>
|
||||||
|
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Description</th>
|
||||||
|
<th>User</th>
|
||||||
|
<th>Status</th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<% @statistics.each do |statistic| %>
|
||||||
|
<tr>
|
||||||
|
<td><%= statistic.name %></td>
|
||||||
|
<td><%= statistic.description %></td>
|
||||||
|
<td><%= statistic.user_id %></td>
|
||||||
|
<td><%= statistic.status %></td>
|
||||||
|
<td><%= link_to 'Show', statistic %></td>
|
||||||
|
<td><%= link_to 'Edit', edit_statistic_path(statistic) %></td>
|
||||||
|
<td><%= link_to 'Destroy', statistic, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||||
|
</tr>
|
||||||
|
<% end %>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
<br />
|
||||||
|
|
||||||
|
<%= link_to 'New Statistic', new_statistic_path %>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<h1>New statistic</h1>
|
||||||
|
|
||||||
|
<%= render 'form' %>
|
||||||
|
|
||||||
|
<%= link_to 'Back', statistics_path %>
|
|
@ -0,0 +1,25 @@
|
||||||
|
<p id="notice"><%= notice %></p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<b>Name:</b>
|
||||||
|
<%= @statistic.name %>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<b>Description:</b>
|
||||||
|
<%= @statistic.description %>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<b>User:</b>
|
||||||
|
<%= @statistic.user_id %>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<b>Status:</b>
|
||||||
|
<%= @statistic.status %>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
<%= link_to 'Edit', edit_statistic_path(@statistic) %> |
|
||||||
|
<%= link_to 'Back', statistics_path %>
|
3225
config/routes.rb
3225
config/routes.rb
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,12 @@
|
||||||
|
class CreateStatistics < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
create_table :statistics do |t|
|
||||||
|
t.string :name
|
||||||
|
t.text :description, :limit => 4294967296
|
||||||
|
t.integer :user_id
|
||||||
|
t.integer :status, :default => 0, :limit => 1
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
620
db/schema.rb
620
db/schema.rb
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended to check this file into your version control system.
|
# It's strongly recommended to check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(:version => 20170425030242) do
|
ActiveRecord::Schema.define(:version => 20180205031602) do
|
||||||
|
|
||||||
create_table "activities", :force => true do |t|
|
create_table "activities", :force => true do |t|
|
||||||
t.integer "act_id", :null => false
|
t.integer "act_id", :null => false
|
||||||
|
@ -84,6 +84,18 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.integer "role", :default => 0
|
t.integer "role", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "apply_actions", :force => true do |t|
|
||||||
|
t.integer "user_id"
|
||||||
|
t.string "reason"
|
||||||
|
t.integer "container_id"
|
||||||
|
t.string "container_type"
|
||||||
|
t.integer "dealer_id"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
t.integer "status", :limit => 1, :default => 0
|
||||||
|
t.text "apply_reason"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "apply_add_departments", :force => true do |t|
|
create_table "apply_add_departments", :force => true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.integer "department_id"
|
t.integer "department_id"
|
||||||
|
@ -144,6 +156,19 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.integer "apply_user_id"
|
t.integer "apply_user_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "apply_user_authentications", :force => true do |t|
|
||||||
|
t.integer "user_id"
|
||||||
|
t.integer "status"
|
||||||
|
t.integer "auth_type"
|
||||||
|
t.string "remarks"
|
||||||
|
t.integer "dealer"
|
||||||
|
t.datetime "deal_time"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "apply_user_authentications", ["user_id"], :name => "index_apply_user_authentications_on_user_id"
|
||||||
|
|
||||||
create_table "article_homepages", :force => true do |t|
|
create_table "article_homepages", :force => true do |t|
|
||||||
t.string "title"
|
t.string "title"
|
||||||
t.text "content"
|
t.text "content"
|
||||||
|
@ -244,6 +269,16 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
|
|
||||||
add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type"
|
add_index "auth_sources", ["id", "type"], :name => "index_auth_sources_on_id_and_type"
|
||||||
|
|
||||||
|
create_table "authentications", :force => true do |t|
|
||||||
|
t.integer "level", :limit => 1
|
||||||
|
t.text "permissions"
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "authentications_users", :force => true do |t|
|
||||||
|
t.integer "user_id"
|
||||||
|
t.integer "authentication_id"
|
||||||
|
end
|
||||||
|
|
||||||
create_table "biding_projects", :force => true do |t|
|
create_table "biding_projects", :force => true do |t|
|
||||||
t.integer "project_id"
|
t.integer "project_id"
|
||||||
t.integer "bid_id"
|
t.integer "bid_id"
|
||||||
|
@ -346,6 +381,28 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "challenge_chooses", :force => true do |t|
|
||||||
|
t.text "subject"
|
||||||
|
t.integer "challenge_id"
|
||||||
|
t.string "standard_answer"
|
||||||
|
t.text "answer"
|
||||||
|
t.integer "score"
|
||||||
|
t.integer "difficult"
|
||||||
|
t.integer "category"
|
||||||
|
t.integer "position", :default => 1
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "challenge_questions", :force => true do |t|
|
||||||
|
t.text "option_name"
|
||||||
|
t.integer "challenge_choose_id"
|
||||||
|
t.boolean "right_key"
|
||||||
|
t.integer "position", :limit => 1
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "challenge_samples", :force => true do |t|
|
create_table "challenge_samples", :force => true do |t|
|
||||||
t.string "input"
|
t.string "input"
|
||||||
t.string "output"
|
t.string "output"
|
||||||
|
@ -358,8 +415,9 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
create_table "challenge_tags", :force => true do |t|
|
create_table "challenge_tags", :force => true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.integer "challenge_id"
|
t.integer "challenge_id"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
|
t.integer "challenge_choose_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "challenges", :force => true do |t|
|
create_table "challenges", :force => true do |t|
|
||||||
|
@ -369,17 +427,20 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.integer "status", :limit => 1, :default => 0
|
t.integer "status", :limit => 1, :default => 0
|
||||||
t.integer "position", :limit => 1, :default => 1
|
t.integer "position", :limit => 1, :default => 1
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.text "ready_knowledge"
|
t.text "ready_knowledge", :limit => 2147483647
|
||||||
t.text "task_pass", :limit => 2147483647
|
t.text "task_pass", :limit => 2147483647
|
||||||
t.text "answer", :limit => 2147483647
|
t.text "answer", :limit => 2147483647
|
||||||
t.integer "score"
|
t.integer "score", :default => 100
|
||||||
t.integer "visits", :default => 0
|
t.integer "visits", :default => 0
|
||||||
t.string "path"
|
t.string "path"
|
||||||
t.integer "evaluation_way", :default => 0
|
t.integer "evaluation_way", :default => 0
|
||||||
t.integer "difficulty", :default => 1
|
t.integer "difficulty", :default => 1
|
||||||
t.text "pipeline_script"
|
t.text "pipeline_script"
|
||||||
|
t.string "exec_path"
|
||||||
|
t.integer "code_line"
|
||||||
|
t.integer "st", :limit => 1, :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "changes", :force => true do |t|
|
create_table "changes", :force => true do |t|
|
||||||
|
@ -428,6 +489,15 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
|
|
||||||
add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true
|
add_index "changesets_issues", ["changeset_id", "issue_id"], :name => "changesets_issues_ids", :unique => true
|
||||||
|
|
||||||
|
create_table "choose_outputs", :force => true do |t|
|
||||||
|
t.integer "challenge_choose_id"
|
||||||
|
t.integer "user_id"
|
||||||
|
t.string "answer"
|
||||||
|
t.boolean "correct"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "code_review_assignments", :force => true do |t|
|
create_table "code_review_assignments", :force => true do |t|
|
||||||
t.integer "issue_id"
|
t.integer "issue_id"
|
||||||
t.integer "change_id"
|
t.integer "change_id"
|
||||||
|
@ -574,13 +644,6 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
add_index "contest_messages", ["contest_id"], :name => "index_contest_messages_on_contest_id"
|
add_index "contest_messages", ["contest_id"], :name => "index_contest_messages_on_contest_id"
|
||||||
add_index "contest_messages", ["user_id"], :name => "index_contest_messages_on_user_id"
|
add_index "contest_messages", ["user_id"], :name => "index_contest_messages_on_user_id"
|
||||||
|
|
||||||
create_table "contest_notifications", :force => true do |t|
|
|
||||||
t.text "title"
|
|
||||||
t.text "content"
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "contestant_for_contests", :force => true do |t|
|
create_table "contestant_for_contests", :force => true do |t|
|
||||||
t.integer "student_id"
|
t.integer "student_id"
|
||||||
t.integer "contest_id"
|
t.integer "contest_id"
|
||||||
|
@ -648,37 +711,6 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
add_index "contestant_works", ["user_id"], :name => "index_contestant_works_on_user_id"
|
add_index "contestant_works", ["user_id"], :name => "index_contestant_works_on_user_id"
|
||||||
add_index "contestant_works", ["work_id"], :name => "index_contestant_works_on_work_id"
|
add_index "contestant_works", ["work_id"], :name => "index_contestant_works_on_work_id"
|
||||||
|
|
||||||
create_table "contesting_projects", :force => true do |t|
|
|
||||||
t.integer "project_id"
|
|
||||||
t.string "contest_id"
|
|
||||||
t.integer "user_id"
|
|
||||||
t.string "description"
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
t.string "reward"
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "contesting_softapplications", :force => true do |t|
|
|
||||||
t.integer "softapplication_id"
|
|
||||||
t.integer "contest_id"
|
|
||||||
t.integer "user_id"
|
|
||||||
t.string "description"
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
t.string "reward"
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "contestnotifications", :force => true do |t|
|
|
||||||
t.integer "contest_id"
|
|
||||||
t.string "title"
|
|
||||||
t.string "summary"
|
|
||||||
t.text "description"
|
|
||||||
t.integer "author_id"
|
|
||||||
t.integer "notificationcomments_count"
|
|
||||||
t.datetime "created_at", :null => false
|
|
||||||
t.datetime "updated_at", :null => false
|
|
||||||
end
|
|
||||||
|
|
||||||
create_table "contests", :force => true do |t|
|
create_table "contests", :force => true do |t|
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.string "name"
|
t.string "name"
|
||||||
|
@ -770,6 +802,15 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "course_lists", :force => true do |t|
|
||||||
|
t.string "name"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.integer "user_id"
|
||||||
|
t.boolean "is_admin", :default => true
|
||||||
|
t.boolean "support_shixuns_search", :default => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "course_messages", :force => true do |t|
|
create_table "course_messages", :force => true do |t|
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.integer "course_id"
|
t.integer "course_id"
|
||||||
|
@ -787,6 +828,15 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
add_index "course_messages", ["course_message_type"], :name => "index_course_messages_on_course_message_type"
|
add_index "course_messages", ["course_message_type"], :name => "index_course_messages_on_course_message_type"
|
||||||
add_index "course_messages", ["user_id", "course_id", "created_at"], :name => "index_course_messages_on_user_id_and_course_id_and_created_at"
|
add_index "course_messages", ["user_id", "course_id", "created_at"], :name => "index_course_messages_on_user_id_and_course_id_and_created_at"
|
||||||
|
|
||||||
|
create_table "course_modules", :force => true do |t|
|
||||||
|
t.integer "course_id"
|
||||||
|
t.string "module_type"
|
||||||
|
t.integer "position"
|
||||||
|
t.integer "hidden"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "course_statuses", :force => true do |t|
|
create_table "course_statuses", :force => true do |t|
|
||||||
t.integer "changesets_count"
|
t.integer "changesets_count"
|
||||||
t.integer "watchers_count"
|
t.integer "watchers_count"
|
||||||
|
@ -804,8 +854,8 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.string "code"
|
t.string "code"
|
||||||
t.integer "time"
|
t.integer "time"
|
||||||
t.string "extra"
|
t.string "extra"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.string "location"
|
t.string "location"
|
||||||
t.string "term"
|
t.string "term"
|
||||||
t.string "string"
|
t.string "string"
|
||||||
|
@ -815,28 +865,34 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.string "class_period"
|
t.string "class_period"
|
||||||
t.integer "school_id"
|
t.integer "school_id"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
t.integer "status", :default => 1
|
t.integer "status", :default => 1
|
||||||
t.integer "attachmenttype", :default => 2
|
t.integer "attachmenttype", :default => 2
|
||||||
t.integer "lft"
|
t.integer "lft"
|
||||||
t.integer "rgt"
|
t.integer "rgt"
|
||||||
t.integer "is_public", :limit => 1, :default => 1
|
t.integer "is_public", :limit => 1, :default => 1
|
||||||
t.integer "inherit_members", :limit => 1, :default => 1
|
t.integer "inherit_members", :limit => 1, :default => 1
|
||||||
t.integer "open_student", :default => 0
|
t.integer "open_student", :default => 0
|
||||||
t.integer "outline", :default => 0
|
t.integer "outline", :default => 0
|
||||||
t.integer "publish_resource", :default => 0
|
t.integer "publish_resource", :default => 0
|
||||||
t.integer "is_delete", :default => 0
|
t.integer "is_delete", :default => 0
|
||||||
t.integer "end_time"
|
t.integer "end_time"
|
||||||
t.string "end_term"
|
t.string "end_term"
|
||||||
t.integer "is_excellent", :default => 0
|
t.integer "is_excellent", :default => 0
|
||||||
t.integer "excellent_option", :default => 0
|
t.integer "excellent_option", :default => 0
|
||||||
t.integer "is_copy", :default => 0
|
t.integer "is_copy", :default => 0
|
||||||
t.integer "visits", :default => 0
|
t.integer "visits", :default => 0
|
||||||
t.integer "syllabus_id"
|
t.integer "syllabus_id"
|
||||||
t.string "invite_code"
|
t.string "invite_code"
|
||||||
t.string "qrcode"
|
t.string "qrcode"
|
||||||
t.integer "qrcode_expiretime", :default => 0
|
t.integer "qrcode_expiretime", :default => 0
|
||||||
t.integer "invite_code_halt", :limit => 1, :default => 0
|
t.integer "invite_code_halt", :limit => 1, :default => 0
|
||||||
t.integer "os_allow", :default => 0
|
t.integer "os_allow", :default => 0
|
||||||
|
t.float "credit"
|
||||||
|
t.boolean "is_end", :default => false
|
||||||
|
t.date "end_date"
|
||||||
|
t.boolean "choose_group_allow", :default => false
|
||||||
|
t.boolean "homepage_show", :default => false
|
||||||
|
t.integer "course_list_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "courses", ["invite_code"], :name => "index_courses_on_invite_code", :unique => true
|
add_index "courses", ["invite_code"], :name => "index_courses_on_invite_code", :unique => true
|
||||||
|
@ -947,6 +1003,21 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "discusses", :force => true do |t|
|
||||||
|
t.integer "user_id"
|
||||||
|
t.string "dis_type"
|
||||||
|
t.integer "dis_id"
|
||||||
|
t.text "content"
|
||||||
|
t.integer "parent_id"
|
||||||
|
t.integer "root_id"
|
||||||
|
t.integer "praise_count"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
t.integer "challenge_id"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "discusses", ["user_id"], :name => "index_discusses_on_user_id"
|
||||||
|
|
||||||
create_table "documents", :force => true do |t|
|
create_table "documents", :force => true do |t|
|
||||||
t.integer "project_id", :default => 0, :null => false
|
t.integer "project_id", :default => 0, :null => false
|
||||||
t.integer "category_id", :default => 0, :null => false
|
t.integer "category_id", :default => 0, :null => false
|
||||||
|
@ -1077,6 +1148,15 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.integer "choice_random", :default => 0
|
t.integer "choice_random", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "experiences", :force => true do |t|
|
||||||
|
t.integer "user_id"
|
||||||
|
t.integer "container_id"
|
||||||
|
t.string "container_type"
|
||||||
|
t.integer "score"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "first_level_disciplines", :force => true do |t|
|
create_table "first_level_disciplines", :force => true do |t|
|
||||||
t.integer "discipline_category_id"
|
t.integer "discipline_category_id"
|
||||||
t.string "name"
|
t.string "name"
|
||||||
|
@ -1148,6 +1228,15 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.datetime "created_at"
|
t.datetime "created_at"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "game_codes", :force => true do |t|
|
||||||
|
t.integer "game_id"
|
||||||
|
t.text "original_code", :limit => 2147483647
|
||||||
|
t.text "new_code", :limit => 2147483647
|
||||||
|
t.string "path"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "game_outputs", :force => true do |t|
|
create_table "game_outputs", :force => true do |t|
|
||||||
t.integer "code"
|
t.integer "code"
|
||||||
t.integer "game_id"
|
t.integer "game_id"
|
||||||
|
@ -1160,12 +1249,26 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
create_table "games", :force => true do |t|
|
create_table "games", :force => true do |t|
|
||||||
t.integer "myshixun_id"
|
t.integer "myshixun_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "status", :default => 0
|
t.integer "status", :default => 0
|
||||||
t.integer "final_score", :default => 0
|
t.integer "final_score", :default => 0
|
||||||
t.integer "challenge_id"
|
t.integer "challenge_id"
|
||||||
t.datetime "open_time"
|
t.datetime "open_time"
|
||||||
|
t.string "identifier"
|
||||||
|
t.boolean "answer_open"
|
||||||
|
t.datetime "end_time"
|
||||||
|
t.integer "retry_status", :default => 0
|
||||||
|
t.string "resubmit_identifier"
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "grades", :force => true do |t|
|
||||||
|
t.integer "user_id"
|
||||||
|
t.integer "container_id"
|
||||||
|
t.string "container_type"
|
||||||
|
t.integer "score"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "groups_users", :id => false, :force => true do |t|
|
create_table "groups_users", :id => false, :force => true do |t|
|
||||||
|
@ -1201,6 +1304,26 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
|
|
||||||
add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id"
|
add_index "homework_attaches", ["bid_id"], :name => "index_homework_attaches_on_bid_id"
|
||||||
|
|
||||||
|
create_table "homework_bank_samples", :force => true do |t|
|
||||||
|
t.text "input"
|
||||||
|
t.text "output"
|
||||||
|
t.integer "homework_bank_id"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "homework_bank_samples", ["homework_bank_id"], :name => "index_homework_bank_samples_on_homework_bank_id"
|
||||||
|
|
||||||
|
create_table "homework_bank_shixuns", :force => true do |t|
|
||||||
|
t.integer "homework_bank_id"
|
||||||
|
t.integer "shixun_id"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "homework_bank_shixuns", ["homework_bank_id"], :name => "index_homework_bank_shixuns_on_homework_bank_id"
|
||||||
|
add_index "homework_bank_shixuns", ["shixun_id"], :name => "index_homework_bank_shixuns_on_shixun_id"
|
||||||
|
|
||||||
create_table "homework_bank_tests", :force => true do |t|
|
create_table "homework_bank_tests", :force => true do |t|
|
||||||
t.text "input"
|
t.text "input"
|
||||||
t.text "output"
|
t.text "output"
|
||||||
|
@ -1215,17 +1338,23 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
t.integer "homework_type"
|
t.integer "homework_type"
|
||||||
t.integer "quotes", :default => 0
|
t.integer "quotes", :default => 0
|
||||||
t.boolean "is_public"
|
t.boolean "is_public"
|
||||||
t.string "language"
|
t.string "language"
|
||||||
t.text "standard_code", :limit => 2147483647
|
t.text "standard_code", :limit => 2147483647
|
||||||
t.integer "min_num"
|
t.integer "min_num"
|
||||||
t.integer "max_num"
|
t.integer "max_num"
|
||||||
t.boolean "base_on_project"
|
t.boolean "base_on_project"
|
||||||
t.string "applicable_syllabus"
|
t.string "applicable_syllabus"
|
||||||
t.integer "homework_common_id"
|
t.integer "homework_common_id"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
|
t.text "reference_answer"
|
||||||
|
t.integer "syllabus_id"
|
||||||
|
t.text "major_level"
|
||||||
|
t.text "discipline_category_id"
|
||||||
|
t.text "first_level_discipline_id"
|
||||||
|
t.integer "course_list_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "homework_commons", :force => true do |t|
|
create_table "homework_commons", :force => true do |t|
|
||||||
|
@ -1248,10 +1377,24 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.integer "anonymous_appeal", :default => 0
|
t.integer "anonymous_appeal", :default => 0
|
||||||
t.integer "homework_bank_id"
|
t.integer "homework_bank_id"
|
||||||
t.boolean "is_update", :default => false
|
t.boolean "is_update", :default => false
|
||||||
|
t.boolean "is_public", :default => false
|
||||||
|
t.text "reference_answer"
|
||||||
|
t.boolean "answer_public", :default => true
|
||||||
|
t.datetime "archive_time"
|
||||||
|
t.boolean "allow_late", :default => true
|
||||||
|
t.datetime "late_time"
|
||||||
|
t.boolean "work_public", :default => true
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "homework_commons", ["course_id", "id"], :name => "index_homework_commons_on_course_id_and_id"
|
add_index "homework_commons", ["course_id", "id"], :name => "index_homework_commons_on_course_id_and_id"
|
||||||
|
|
||||||
|
create_table "homework_commons_shixuns", :force => true do |t|
|
||||||
|
t.integer "shixun_id"
|
||||||
|
t.integer "homework_common_id"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "homework_detail_groups", :force => true do |t|
|
create_table "homework_detail_groups", :force => true do |t|
|
||||||
t.integer "homework_common_id"
|
t.integer "homework_common_id"
|
||||||
t.integer "min_num"
|
t.integer "min_num"
|
||||||
|
@ -1266,18 +1409,20 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
create_table "homework_detail_manuals", :force => true do |t|
|
create_table "homework_detail_manuals", :force => true do |t|
|
||||||
t.float "ta_proportion"
|
t.float "ta_proportion"
|
||||||
t.integer "comment_status"
|
t.integer "comment_status"
|
||||||
t.date "evaluation_start"
|
t.datetime "evaluation_start"
|
||||||
t.date "evaluation_end"
|
t.datetime "evaluation_end"
|
||||||
t.integer "evaluation_num"
|
t.integer "evaluation_num"
|
||||||
t.integer "absence_penalty", :default => 1
|
t.integer "absence_penalty", :default => 1
|
||||||
t.integer "homework_common_id"
|
t.integer "homework_common_id"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "no_anon_penalty", :default => 1
|
t.integer "no_anon_penalty", :default => 1
|
||||||
t.integer "appeal_penalty", :default => 0
|
t.integer "appeal_penalty", :default => 0
|
||||||
t.integer "ta_mode", :default => 1
|
t.integer "ta_mode", :default => 1
|
||||||
t.float "te_proportion", :default => 1.0
|
t.datetime "appeal_time"
|
||||||
t.boolean "final_mode", :default => false
|
t.float "te_proportion", :default => 1.0
|
||||||
|
t.boolean "final_mode", :default => false
|
||||||
|
t.boolean "answer_open_evaluation", :default => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "homework_detail_programings", :force => true do |t|
|
create_table "homework_detail_programings", :force => true do |t|
|
||||||
|
@ -1305,6 +1450,15 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
add_index "homework_for_courses", ["bid_id"], :name => "index_homework_for_courses_on_bid_id"
|
add_index "homework_for_courses", ["bid_id"], :name => "index_homework_for_courses_on_bid_id"
|
||||||
add_index "homework_for_courses", ["course_id"], :name => "index_homework_for_courses_on_course_id"
|
add_index "homework_for_courses", ["course_id"], :name => "index_homework_for_courses_on_course_id"
|
||||||
|
|
||||||
|
create_table "homework_reference_answers", :force => true do |t|
|
||||||
|
t.text "answer"
|
||||||
|
t.integer "homework_common_id"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "homework_reference_answers", ["homework_common_id"], :name => "index_homework_reference_answers_on_homework_common_id"
|
||||||
|
|
||||||
create_table "homework_samples", :force => true do |t|
|
create_table "homework_samples", :force => true do |t|
|
||||||
t.text "input"
|
t.text "input"
|
||||||
t.text "output"
|
t.text "output"
|
||||||
|
@ -1332,6 +1486,16 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "import_students", :force => true do |t|
|
||||||
|
t.string "name"
|
||||||
|
t.string "student_number"
|
||||||
|
t.integer "course_id"
|
||||||
|
t.integer "school_id"
|
||||||
|
t.integer "status", :default => 0
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "innodb_monitor", :id => false, :force => true do |t|
|
create_table "innodb_monitor", :id => false, :force => true do |t|
|
||||||
t.integer "a"
|
t.integer "a"
|
||||||
end
|
end
|
||||||
|
@ -1496,6 +1660,28 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.integer "owner_type", :default => 0
|
t.integer "owner_type", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "major_courses", :force => true do |t|
|
||||||
|
t.integer "course_list_id"
|
||||||
|
t.integer "major_id"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "major_courses", ["course_list_id"], :name => "index_major_courses_on_course_list_id"
|
||||||
|
add_index "major_courses", ["major_id"], :name => "index_major_courses_on_major_id"
|
||||||
|
|
||||||
|
create_table "majors", :force => true do |t|
|
||||||
|
t.string "major_code"
|
||||||
|
t.string "name"
|
||||||
|
t.integer "first_level_discipline_id"
|
||||||
|
t.integer "discipline_category_id"
|
||||||
|
t.integer "major_level"
|
||||||
|
t.datetime "created_at"
|
||||||
|
t.datetime "updated_at"
|
||||||
|
t.boolean "support_shixuns", :default => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "majors", ["discipline_category_id"], :name => "index_majors_on_discipline_category_id"
|
||||||
|
add_index "majors", ["first_level_discipline_id"], :name => "index_majors_on_first_level_discipline_id"
|
||||||
|
|
||||||
create_table "mark_downs", :force => true do |t|
|
create_table "mark_downs", :force => true do |t|
|
||||||
t.text "description"
|
t.text "description"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
|
@ -1520,6 +1706,7 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.integer "course_id", :default => -1
|
t.integer "course_id", :default => -1
|
||||||
t.integer "course_group_id", :default => 0
|
t.integer "course_group_id", :default => 0
|
||||||
t.integer "is_collect", :default => 1
|
t.integer "is_collect", :default => 1
|
||||||
|
t.integer "import_student_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "members", ["course_id"], :name => "index_members_on_course_id"
|
add_index "members", ["course_id"], :name => "index_members_on_course_id"
|
||||||
|
@ -1585,6 +1772,7 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.integer "quotes"
|
t.integer "quotes"
|
||||||
t.integer "status", :default => 0
|
t.integer "status", :default => 0
|
||||||
t.integer "root_id"
|
t.integer "root_id"
|
||||||
|
t.integer "visits", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "messages", ["author_id"], :name => "index_messages_on_author_id"
|
add_index "messages", ["author_id"], :name => "index_messages_on_author_id"
|
||||||
|
@ -1594,6 +1782,54 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
add_index "messages", ["parent_id"], :name => "messages_parent_id"
|
add_index "messages", ["parent_id"], :name => "messages_parent_id"
|
||||||
add_index "messages", ["root_id"], :name => "index_messages_on_root_id"
|
add_index "messages", ["root_id"], :name => "index_messages_on_root_id"
|
||||||
|
|
||||||
|
create_table "mirror_repositories", :force => true do |t|
|
||||||
|
t.string "mirrorID"
|
||||||
|
t.string "name"
|
||||||
|
t.string "main_type"
|
||||||
|
t.string "tag"
|
||||||
|
t.text "description"
|
||||||
|
t.integer "status"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "mirror_repository_types", :force => true do |t|
|
||||||
|
t.integer "mirror_type_id"
|
||||||
|
t.integer "mirror_repository_id"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "mirror_repository_types", ["mirror_repository_id"], :name => "index_mirror_repository_types_on_mirror_repository_id"
|
||||||
|
add_index "mirror_repository_types", ["mirror_type_id"], :name => "index_mirror_repository_types_on_mirror_type_id"
|
||||||
|
|
||||||
|
create_table "mirror_types", :force => true do |t|
|
||||||
|
t.string "name"
|
||||||
|
t.integer "user_id"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "mirror_update_records", :force => true do |t|
|
||||||
|
t.integer "user_id"
|
||||||
|
t.integer "mirror_repository_id"
|
||||||
|
t.string "oldName"
|
||||||
|
t.string "newName"
|
||||||
|
t.string "oldType"
|
||||||
|
t.string "newType"
|
||||||
|
t.text "oldTag"
|
||||||
|
t.text "newTag"
|
||||||
|
t.text "oldDescription"
|
||||||
|
t.text "newDescription"
|
||||||
|
t.integer "oldStatus"
|
||||||
|
t.integer "newStatus"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "mirror_update_records", ["mirror_repository_id"], :name => "index_mirror_update_records_on_mirror_repository_id"
|
||||||
|
add_index "mirror_update_records", ["user_id"], :name => "index_mirror_update_records_on_user_id"
|
||||||
|
|
||||||
create_table "myshixun_members", :force => true do |t|
|
create_table "myshixun_members", :force => true do |t|
|
||||||
t.integer "myshixun_id"
|
t.integer "myshixun_id"
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
|
@ -1613,6 +1849,8 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "status", :default => 0
|
t.integer "status", :default => 0
|
||||||
|
t.string "identifier"
|
||||||
|
t.string "commit_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "news", :force => true do |t|
|
create_table "news", :force => true do |t|
|
||||||
|
@ -1814,9 +2052,15 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.integer "code"
|
t.integer "code"
|
||||||
t.integer "game_id"
|
t.integer "game_id"
|
||||||
t.text "msg"
|
t.text "msg"
|
||||||
t.text "out_put", :limit => 2147483647
|
t.text "out_put", :limit => 2147483647
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
|
t.integer "test_set_position"
|
||||||
|
t.text "actual_output"
|
||||||
|
t.boolean "result"
|
||||||
|
t.boolean "is_public"
|
||||||
|
t.integer "query_index", :default => 1
|
||||||
|
t.integer "compile_success", :default => 1
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "phone_app_versions", :force => true do |t|
|
create_table "phone_app_versions", :force => true do |t|
|
||||||
|
@ -1876,6 +2120,14 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.integer "show_result", :default => 1
|
t.integer "show_result", :default => 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "pr_paths", :force => true do |t|
|
||||||
|
t.integer "project_id"
|
||||||
|
t.integer "gitlab_project_id"
|
||||||
|
t.string "path"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "praise_tread_caches", :force => true do |t|
|
create_table "praise_tread_caches", :force => true do |t|
|
||||||
t.integer "object_id", :null => false
|
t.integer "object_id", :null => false
|
||||||
t.string "object_type"
|
t.string "object_type"
|
||||||
|
@ -2107,6 +2359,15 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
|
|
||||||
add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id"
|
add_index "repositories", ["project_id"], :name => "index_repositories_on_project_id"
|
||||||
|
|
||||||
|
create_table "repository_paths", :force => true do |t|
|
||||||
|
t.string "path"
|
||||||
|
t.integer "myshixun_id"
|
||||||
|
t.integer "user_id"
|
||||||
|
t.integer "status"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "resource_banks", :force => true do |t|
|
create_table "resource_banks", :force => true do |t|
|
||||||
t.integer "course_id"
|
t.integer "course_id"
|
||||||
t.integer "attachment_id"
|
t.integer "attachment_id"
|
||||||
|
@ -2127,6 +2388,7 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.integer "first_level_discipline_id"
|
t.integer "first_level_discipline_id"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
|
t.string "content_type"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "resource_banks", ["course_id"], :name => "index_resource_banks_on_course_id"
|
add_index "resource_banks", ["course_id"], :name => "index_resource_banks_on_course_id"
|
||||||
|
@ -2157,13 +2419,14 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
create_table "schools", :force => true do |t|
|
create_table "schools", :force => true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.string "province"
|
t.string "province"
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.string "logo_link"
|
t.string "logo_link"
|
||||||
t.string "pinyin"
|
t.string "pinyin"
|
||||||
t.integer "school_type", :default => 0
|
t.integer "school_type", :default => 0
|
||||||
t.string "city"
|
t.string "city"
|
||||||
t.string "address"
|
t.string "address"
|
||||||
|
t.boolean "auto_users_trial", :default => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "secdomains", :force => true do |t|
|
create_table "secdomains", :force => true do |t|
|
||||||
|
@ -2234,6 +2497,17 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "shixun_major_courses", :force => true do |t|
|
||||||
|
t.integer "shixun_id"
|
||||||
|
t.integer "course_list_id"
|
||||||
|
t.integer "major_id"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "shixun_major_courses", ["major_id"], :name => "index_shixun_major_courses_on_major_id"
|
||||||
|
add_index "shixun_major_courses", ["shixun_id"], :name => "index_shixun_major_courses_on_shixun_id"
|
||||||
|
|
||||||
create_table "shixun_members", :force => true do |t|
|
create_table "shixun_members", :force => true do |t|
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.integer "shixun_id"
|
t.integer "shixun_id"
|
||||||
|
@ -2242,19 +2516,54 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "shixun_modifies", :force => true do |t|
|
||||||
|
t.integer "shixun_id"
|
||||||
|
t.integer "myshixun_id"
|
||||||
|
t.integer "status", :limit => 1, :default => 0
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "shixun_ports", :force => true do |t|
|
||||||
|
t.integer "shixun_id"
|
||||||
|
t.integer "port"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "shixun_tags", :force => true do |t|
|
||||||
|
t.string "name"
|
||||||
|
t.integer "challenge_id"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "shixuns", :force => true do |t|
|
create_table "shixuns", :force => true do |t|
|
||||||
t.string "name"
|
t.string "name"
|
||||||
t.text "description"
|
t.text "description"
|
||||||
t.text "script"
|
t.text "script"
|
||||||
t.boolean "is_public", :default => true
|
t.boolean "is_public", :default => true
|
||||||
t.integer "user_id"
|
t.integer "user_id"
|
||||||
t.integer "gpid"
|
t.integer "gpid"
|
||||||
t.integer "visits", :default => 0
|
t.integer "visits", :default => 0
|
||||||
t.datetime "created_at", :null => false
|
t.datetime "created_at", :null => false
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "changeset_num"
|
t.integer "changeset_num"
|
||||||
t.integer "status", :default => 0
|
t.integer "status", :default => 0
|
||||||
t.string "language"
|
t.string "language"
|
||||||
|
t.string "identifier"
|
||||||
|
t.boolean "authentication", :default => false
|
||||||
|
t.integer "myshixun_count", :default => 0
|
||||||
|
t.string "exec_path"
|
||||||
|
t.text "propaedeutics", :limit => 2147483647
|
||||||
|
t.integer "is_updated", :default => 0
|
||||||
|
t.boolean "webssh", :default => false
|
||||||
|
t.integer "trainee", :default => 1
|
||||||
|
t.integer "major_id"
|
||||||
|
t.boolean "homepage_show", :default => false
|
||||||
|
t.boolean "hidden", :default => false
|
||||||
|
t.integer "fork_from"
|
||||||
|
t.boolean "can_copy", :default => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "softapplications", :force => true do |t|
|
create_table "softapplications", :force => true do |t|
|
||||||
|
@ -2297,6 +2606,41 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
|
|
||||||
add_index "ssos", ["user_id"], :name => "index_ssos_on_user_id"
|
add_index "ssos", ["user_id"], :name => "index_ssos_on_user_id"
|
||||||
|
|
||||||
|
create_table "stage_shixuns", :force => true do |t|
|
||||||
|
t.integer "subject_id"
|
||||||
|
t.integer "stage_id"
|
||||||
|
t.integer "shixun_id"
|
||||||
|
t.integer "position"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "stage_shixuns", ["shixun_id"], :name => "index_stage_shixuns_on_shixun_id"
|
||||||
|
add_index "stage_shixuns", ["stage_id"], :name => "index_stage_shixuns_on_stage_id"
|
||||||
|
add_index "stage_shixuns", ["subject_id"], :name => "index_stage_shixuns_on_subject_id"
|
||||||
|
|
||||||
|
create_table "stages", :force => true do |t|
|
||||||
|
t.integer "subject_id"
|
||||||
|
t.string "name"
|
||||||
|
t.text "description"
|
||||||
|
t.integer "user_id"
|
||||||
|
t.integer "position"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "stages", ["subject_id"], :name => "index_stages_on_subject_id"
|
||||||
|
add_index "stages", ["user_id"], :name => "index_stages_on_user_id"
|
||||||
|
|
||||||
|
create_table "statistics", :force => true do |t|
|
||||||
|
t.string "name"
|
||||||
|
t.text "description"
|
||||||
|
t.integer "user_id"
|
||||||
|
t.integer "status", :limit => 1, :default => 0
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "student_work_projects", :force => true do |t|
|
create_table "student_work_projects", :force => true do |t|
|
||||||
t.integer "homework_common_id"
|
t.integer "homework_common_id"
|
||||||
t.integer "student_work_id"
|
t.integer "student_work_id"
|
||||||
|
@ -2348,9 +2692,13 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.integer "is_delete", :default => 0
|
t.integer "is_delete", :default => 0
|
||||||
t.integer "appeal_penalty", :default => 0
|
t.integer "appeal_penalty", :default => 0
|
||||||
t.boolean "re_commit", :default => false
|
t.boolean "re_commit", :default => false
|
||||||
|
t.text "late_reason"
|
||||||
|
t.integer "group_id", :default => 0
|
||||||
|
t.integer "myshixun_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id"
|
add_index "student_works", ["homework_common_id", "user_id"], :name => "index_student_works_on_homework_common_id_and_user_id"
|
||||||
|
add_index "student_works", ["myshixun_id"], :name => "myshixun_id"
|
||||||
|
|
||||||
create_table "student_works_evaluation_distributions", :force => true do |t|
|
create_table "student_works_evaluation_distributions", :force => true do |t|
|
||||||
t.integer "student_work_id"
|
t.integer "student_work_id"
|
||||||
|
@ -2425,6 +2773,25 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "subjects", :force => true do |t|
|
||||||
|
t.string "name"
|
||||||
|
t.text "description"
|
||||||
|
t.integer "user_id"
|
||||||
|
t.integer "visits"
|
||||||
|
t.integer "status"
|
||||||
|
t.integer "course_list_id"
|
||||||
|
t.integer "major_id"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
t.boolean "hidden", :default => false
|
||||||
|
t.text "learning_notes"
|
||||||
|
t.string "introduction"
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "subjects", ["course_list_id"], :name => "index_subjects_on_course_list_id"
|
||||||
|
add_index "subjects", ["major_id"], :name => "index_subjects_on_major_id"
|
||||||
|
add_index "subjects", ["user_id"], :name => "index_subjects_on_user_id"
|
||||||
|
|
||||||
create_table "syllabus_members", :force => true do |t|
|
create_table "syllabus_members", :force => true do |t|
|
||||||
t.integer "rank"
|
t.integer "rank"
|
||||||
t.integer "syllabus_id"
|
t.integer "syllabus_id"
|
||||||
|
@ -2467,6 +2834,7 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.integer "major_level"
|
t.integer "major_level"
|
||||||
t.integer "discipline_category_id"
|
t.integer "discipline_category_id"
|
||||||
t.integer "first_level_discipline_id"
|
t.integer "first_level_discipline_id"
|
||||||
|
t.integer "major_id"
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "syllabuses", ["user_id"], :name => "index_syllabuses_on_user_id"
|
add_index "syllabuses", ["user_id"], :name => "index_syllabuses_on_user_id"
|
||||||
|
@ -2521,6 +2889,17 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.integer "position"
|
t.integer "position"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "tests", :force => true do |t|
|
||||||
|
t.integer "user_id"
|
||||||
|
t.string "username"
|
||||||
|
t.integer "change_id"
|
||||||
|
t.string "pr_path"
|
||||||
|
t.integer "project_id"
|
||||||
|
t.integer "gpid"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "time_entries", :force => true do |t|
|
create_table "time_entries", :force => true do |t|
|
||||||
t.integer "project_id", :null => false
|
t.integer "project_id", :null => false
|
||||||
t.integer "user_id", :null => false
|
t.integer "user_id", :null => false
|
||||||
|
@ -2569,7 +2948,7 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
t.integer "author_id"
|
t.integer "author_id"
|
||||||
t.integer "status", :limit => 1, :default => 0
|
t.integer "status", :limit => 1, :default => 0
|
||||||
t.integer "position", :limit => 1, :default => 0
|
t.integer "position", :limit => 1
|
||||||
t.integer "result", :default => 0
|
t.integer "result", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -2715,6 +3094,47 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "users", :force => true do |t|
|
create_table "users", :force => true do |t|
|
||||||
|
t.string "login", :default => "", :null => false
|
||||||
|
t.string "hashed_password", :limit => 40, :default => "", :null => false
|
||||||
|
t.string "firstname", :limit => 30, :default => "", :null => false
|
||||||
|
t.string "lastname", :default => "", :null => false
|
||||||
|
t.string "mail", :limit => 60, :default => "", :null => false
|
||||||
|
t.boolean "admin", :default => false, :null => false
|
||||||
|
t.integer "status", :default => 1, :null => false
|
||||||
|
t.datetime "last_login_on"
|
||||||
|
t.string "language", :limit => 5, :default => ""
|
||||||
|
t.integer "auth_source_id"
|
||||||
|
t.datetime "created_on"
|
||||||
|
t.datetime "updated_on"
|
||||||
|
t.string "type"
|
||||||
|
t.string "identity_url"
|
||||||
|
t.string "mail_notification", :default => "", :null => false
|
||||||
|
t.string "salt", :limit => 64
|
||||||
|
t.integer "gid"
|
||||||
|
t.integer "visits", :default => 0
|
||||||
|
t.integer "excellent_teacher", :default => 0
|
||||||
|
t.integer "excellent_student", :default => 0
|
||||||
|
t.string "phone"
|
||||||
|
t.boolean "authentication", :default => false
|
||||||
|
t.integer "grade"
|
||||||
|
t.integer "experience", :default => 0
|
||||||
|
t.string "nickname"
|
||||||
|
t.boolean "show_realname", :default => true
|
||||||
|
t.boolean "professional_certification", :default => false
|
||||||
|
t.string "ID_number"
|
||||||
|
t.integer "certification", :default => 0
|
||||||
|
end
|
||||||
|
|
||||||
|
add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id"
|
||||||
|
add_index "users", ["id", "type"], :name => "index_users_on_id_and_type"
|
||||||
|
add_index "users", ["type"], :name => "index_users_on_type"
|
||||||
|
|
||||||
|
create_table "users_authentications", :force => true do |t|
|
||||||
|
t.integer "user_id"
|
||||||
|
t.integer "authentication_id"
|
||||||
|
end
|
||||||
|
|
||||||
|
create_table "users_copy", :force => true do |t|
|
||||||
t.string "login", :default => "", :null => false
|
t.string "login", :default => "", :null => false
|
||||||
t.string "hashed_password", :limit => 40, :default => "", :null => false
|
t.string "hashed_password", :limit => 40, :default => "", :null => false
|
||||||
t.string "firstname", :limit => 30, :default => "", :null => false
|
t.string "firstname", :limit => 30, :default => "", :null => false
|
||||||
|
@ -2737,11 +3157,13 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.integer "excellent_student", :default => 0
|
t.integer "excellent_student", :default => 0
|
||||||
t.string "phone"
|
t.string "phone"
|
||||||
t.boolean "authentication", :default => false
|
t.boolean "authentication", :default => false
|
||||||
|
t.integer "grade"
|
||||||
|
t.integer "experience", :default => 0
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "users", ["auth_source_id"], :name => "index_users_on_auth_source_id"
|
add_index "users_copy", ["auth_source_id"], :name => "index_users_on_auth_source_id"
|
||||||
add_index "users", ["id", "type"], :name => "index_users_on_id_and_type"
|
add_index "users_copy", ["id", "type"], :name => "index_users_on_id_and_type"
|
||||||
add_index "users", ["type"], :name => "index_users_on_type"
|
add_index "users_copy", ["type"], :name => "index_users_on_type"
|
||||||
|
|
||||||
create_table "verification_codes", :force => true do |t|
|
create_table "verification_codes", :force => true do |t|
|
||||||
t.string "code"
|
t.string "code"
|
||||||
|
@ -2805,6 +3227,14 @@ ActiveRecord::Schema.define(:version => 20170425030242) do
|
||||||
t.datetime "updated_at", :null => false
|
t.datetime "updated_at", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
create_table "websshes", :force => true do |t|
|
||||||
|
t.integer "myshixun_id"
|
||||||
|
t.string "host"
|
||||||
|
t.integer "port"
|
||||||
|
t.datetime "created_at", :null => false
|
||||||
|
t.datetime "updated_at", :null => false
|
||||||
|
end
|
||||||
|
|
||||||
create_table "wechat_logs", :force => true do |t|
|
create_table "wechat_logs", :force => true do |t|
|
||||||
t.string "openid", :null => false
|
t.string "openid", :null => false
|
||||||
t.text "request_raw"
|
t.text "request_raw"
|
||||||
|
|
Loading…
Reference in New Issue