Sha256: bab3650a81dd29f8b3b779977224316979a33b7e0404fe7dcbfadf9cf1522932

Contents?: true

Size: 646 Bytes

Versions: 6

Compression:

Stored size: 646 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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
unidom-party-1.8.3 app/models/unidom/party/government_agency.rb
unidom-party-1.8.2 app/models/unidom/party/government_agency.rb
unidom-party-1.8.1 app/models/unidom/party/government_agency.rb
unidom-party-1.8 app/models/unidom/party/government_agency.rb
unidom-party-1.7.2 app/models/unidom/party/government_agency.rb
unidom-party-1.7.1 app/models/unidom/party/government_agency.rb