mirror of
https://github.com/neocities/neocities.git
synced 2025-08-03 16:21:52 +02:00
add social schema, associations
This commit is contained in:
parent
c0b362ea43
commit
cff94803a9
10 changed files with 139 additions and 0 deletions
|
@ -40,7 +40,23 @@ class Site < Sequel::Model
|
|||
SITE_FILES_ROOT = File.join PUBLIC_ROOT, (ENV['RACK_ENV'] == 'test' ? 'sites_test' : 'sites')
|
||||
|
||||
many_to_one :server
|
||||
|
||||
many_to_many :tags
|
||||
|
||||
one_to_many :follows
|
||||
one_to_many :followings, key: :actioning_site_id, class: :Follow
|
||||
|
||||
one_to_many :tips
|
||||
one_to_many :tippings, key: :actioning_site_id, class: :Tip
|
||||
|
||||
one_to_many :blocks
|
||||
one_to_many :blockings, key: :actioning_site_id, class: :Block
|
||||
|
||||
one_to_many :stats
|
||||
|
||||
one_to_many :events
|
||||
|
||||
one_to_many :changes
|
||||
|
||||
class << self
|
||||
def valid_login?(username, plaintext)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue