mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 19:53:05 +08:00
init project
This commit is contained in:
11
app/models/customer.rb
Normal file
11
app/models/customer.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
class Customer < ApplicationRecord
|
||||
default_scope { order(created_at: :desc) }
|
||||
|
||||
belongs_to :school
|
||||
belongs_to :partner_manager_group, optional: true
|
||||
|
||||
has_many :partner_customers, dependent: :destroy
|
||||
has_many :partners, through: :partner_customers
|
||||
|
||||
has_many :users
|
||||
end
|
||||
Reference in New Issue
Block a user