mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 20:00:49 +08:00
init project
This commit is contained in:
10
app/models/trustie_hack.rb
Normal file
10
app/models/trustie_hack.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
class TrustieHack < ApplicationRecord
|
||||
validates_length_of :description, maximum: 500, message: "不能超过500个字符"
|
||||
has_many :hack_users, :dependent => :destroy
|
||||
belongs_to :trustie_hackathon, counter_cache: true
|
||||
|
||||
|
||||
def entry_info(user_id)
|
||||
hack_users.exists?(user_id: user_id)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user