Sha256: c15127db626aa4db772e2adfc448f7eacb96d64f6b1dbd90466c719b5f72c36c

Contents?: true

Size: 632 Bytes

Versions: 7

Compression:

Stored size: 632 Bytes

Contents

# Government Agency 是政府机构。
# function_code 是行政职能代码: PLST: Police Station 公安局, PLSS: Police Sub-Station 派出所
class Unidom::Party::GovernmentAgency < ActiveRecord::Base

  self.table_name = 'unidom_government_agencies'

  include Unidom::Common::Concerns::ModelExtension
  include Unidom::Party::Concerns::AsSourceParty
  include Unidom::Party::Concerns::AsTargetParty

  validates :name, presence: true, length: { in: 2..self.columns_hash['name'].limit }

  belongs_to :supervision_region, polymorphic: true

  scope :supervision_region_is, ->(region) { where supervision_region: region }

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
unidom-party-1.7 app/models/unidom/party/government_agency.rb
unidom-party-1.6 app/models/unidom/party/government_agency.rb
unidom-party-1.5 app/models/unidom/party/government_agency.rb
unidom-party-1.4 app/models/unidom/party/government_agency.rb
unidom-party-1.3 app/models/unidom/party/government_agency.rb
unidom-party-1.2 app/models/unidom/party/government_agency.rb
unidom-party-1.1 app/models/unidom/party/government_agency.rb