|
|
|
@ -15,7 +15,8 @@ class Myshixun < ActiveRecord::Base
|
|
|
|
|
belongs_to :user
|
|
|
|
|
validates_uniqueness_of :shixun_id, :scope => :user_id, :message => "error"
|
|
|
|
|
# validates :shixun_id, :uniqueness => {:scope => :user_id, :message => "不能被重复开启"}
|
|
|
|
|
scope :min, lambda { select([:id, :shixun_id, :identifier, :gpid, :status, :user_id, :commit_id, :modify_time, :reset_time, :system_tip]) }
|
|
|
|
|
scope :min, lambda { select([:id, :shixun_id, :identifier, :gpid, :status, :user_id, :commit_id, :modify_time, :reset_time,
|
|
|
|
|
:system_tip, :gpid]) }
|
|
|
|
|
scope :finished, lambda{where(status: 1)}
|
|
|
|
|
|
|
|
|
|
def output_times
|
|
|
|
|