Sha256: 0530a54646a35b6be01cc001815737ae4a20d0fd767807c3191e72675eb2c951

Contents?: true

Size: 739 Bytes

Versions: 11

Compression:

Stored size: 739 Bytes

Contents

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

class Unidom::Party::GovernmentAgency < Unidom::Party::ApplicationRecord

  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 unless Unidom::Common::Neglection.namespace_neglected? 'Unidom::Party::GovernmentAgency'

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
unidom-party-2.0 app/models/unidom/party/government_agency.rb
unidom-party-1.9.8 app/models/unidom/party/government_agency.rb
unidom-party-1.9.7 app/models/unidom/party/government_agency.rb
unidom-party-1.9.6 app/models/unidom/party/government_agency.rb
unidom-party-1.9.5 app/models/unidom/party/government_agency.rb
unidom-party-1.9.4 app/models/unidom/party/government_agency.rb
unidom-party-1.9.3 app/models/unidom/party/government_agency.rb
unidom-party-1.9.2 app/models/unidom/party/government_agency.rb
unidom-party-1.9.1 app/models/unidom/party/government_agency.rb
unidom-party-1.9 app/models/unidom/party/government_agency.rb
unidom-party-1.8.5 app/models/unidom/party/government_agency.rb