1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-11-30 21:32:30 +00:00
الملفات
postal/app/models/ip_address.rb
2017-06-01 14:41:38 +01:00

23 أسطر
485 B
Ruby

# == Schema Information
#
# Table name: ip_addresses
#
# id :integer not null, primary key
# ip_pool_id :integer
# ipv4 :string(255)
# ipv6 :string(255)
# created_at :datetime
# updated_at :datetime
# hostname :string(255)
#
class IPAddress < ApplicationRecord
belongs_to :ip_pool
validates :ipv4, :presence => true, :uniqueness => true
validates :hostname, :presence => true
validates :ipv6, :uniqueness => {:allow_blank => true}
end