Sha256: 84da30c3b9ce1fe651532b6aa4f9a39b2fd79935b892ec07bf890c1d780a86ad

Contents?: true

Size: 918 Bytes

Versions: 1

Compression:

Stored size: 918 Bytes

Contents

module PostfixAdmin
  class DomainAdmin < ApplicationRecord
    # version: 1841
    # > describe domain_admins;
    # +----------+--------------+------+-----+---------------------+-------+
    # | Field    | Type         | Null | Key | Default             | Extra |
    # +----------+--------------+------+-----+---------------------+-------+
    # | username | varchar(255) | NO   | MUL | NULL                |       |
    # | domain   | varchar(255) | NO   |     | NULL                |       |
    # | created  | datetime     | NO   |     | 2000-01-01 00:00:00 |       |
    # | active   | tinyint(1)   | NO   |     | 1                   |       |
    # +----------+--------------+------+-----+---------------------+-------+

    self.table_name = :domain_admins

    belongs_to :admin, primary_key: :username, foreign_key: :username
    belongs_to :rel_domain, class_name: "Domain", foreign_key: :domain
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
postfix_admin-0.3.1 lib/postfix_admin/models/domain_admin.rb