Skip to content

Commit 666dd29

Browse files
committed
Annotations from migrations
1 parent 242d4e4 commit 666dd29

File tree

7 files changed

+126
-4
lines changed

7 files changed

+126
-4
lines changed

app/models/pwb/message.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,13 @@ module Pwb
3131
# updated_at :datetime not null
3232
# client_id :integer
3333
# contact_id :integer
34+
# realty_asset_id :uuid
3435
# website_id :bigint
3536
#
3637
# Indexes
3738
#
38-
# index_pwb_messages_on_website_id (website_id)
39+
# index_pwb_messages_on_realty_asset_id (realty_asset_id)
40+
# index_pwb_messages_on_website_id (website_id)
3941
#
4042
# Foreign Keys
4143
#

app/models/pwb/spp_listing.rb

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# frozen_string_literal: true
22

3+
# == Schema Information
4+
#
5+
# Table name: pwb_spp_listings
6+
# Database name: primary
7+
#
8+
# id :uuid not null, primary key
9+
# active :boolean default(FALSE), not null
10+
# archived :boolean default(FALSE)
11+
# extra_data :jsonb
12+
# highlighted_features :jsonb
13+
# listing_type :string default("sale"), not null
14+
# live_url :string
15+
# noindex :boolean default(FALSE), not null
16+
# photo_ids_ordered :jsonb
17+
# price_cents :bigint default(0), not null
18+
# price_currency :string default("EUR"), not null
19+
# published_at :datetime
20+
# spp_settings :jsonb
21+
# spp_slug :string
22+
# template :string
23+
# translations :jsonb not null
24+
# visible :boolean default(FALSE)
25+
# created_at :datetime not null
26+
# updated_at :datetime not null
27+
# realty_asset_id :uuid not null
28+
#
29+
# Indexes
30+
#
31+
# index_pwb_spp_listings_on_noindex (noindex)
32+
# index_pwb_spp_listings_on_realty_asset_id (realty_asset_id)
33+
# index_pwb_spp_listings_on_spp_slug (spp_slug)
34+
# index_pwb_spp_listings_on_translations (translations) USING gin
35+
# index_pwb_spp_listings_unique_active (realty_asset_id,listing_type,active) UNIQUE WHERE (active = true)
36+
#
37+
# Foreign Keys
38+
#
39+
# fk_rails_... (realty_asset_id => pwb_realty_assets.id)
40+
#
341
module Pwb
442
class SppListing < ApplicationRecord
543
include NtfyListingNotifications

app/models/pwb_tenant/message.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@ module PwbTenant
3232
# updated_at :datetime not null
3333
# client_id :integer
3434
# contact_id :integer
35+
# realty_asset_id :uuid
3536
# website_id :bigint
3637
#
3738
# Indexes
3839
#
39-
# index_pwb_messages_on_website_id (website_id)
40+
# index_pwb_messages_on_realty_asset_id (realty_asset_id)
41+
# index_pwb_messages_on_website_id (website_id)
4042
#
4143
# Foreign Keys
4244
#

spec/factories/pwb_messages.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@
2525
# updated_at :datetime not null
2626
# client_id :integer
2727
# contact_id :integer
28+
# realty_asset_id :uuid
2829
# website_id :bigint
2930
#
3031
# Indexes
3132
#
32-
# index_pwb_messages_on_website_id (website_id)
33+
# index_pwb_messages_on_realty_asset_id (realty_asset_id)
34+
# index_pwb_messages_on_website_id (website_id)
3335
#
3436
# Foreign Keys
3537
#

spec/factories/pwb_spp_listings.rb

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# frozen_string_literal: true
22

3+
# == Schema Information
4+
#
5+
# Table name: pwb_spp_listings
6+
# Database name: primary
7+
#
8+
# id :uuid not null, primary key
9+
# active :boolean default(FALSE), not null
10+
# archived :boolean default(FALSE)
11+
# extra_data :jsonb
12+
# highlighted_features :jsonb
13+
# listing_type :string default("sale"), not null
14+
# live_url :string
15+
# noindex :boolean default(FALSE), not null
16+
# photo_ids_ordered :jsonb
17+
# price_cents :bigint default(0), not null
18+
# price_currency :string default("EUR"), not null
19+
# published_at :datetime
20+
# spp_settings :jsonb
21+
# spp_slug :string
22+
# template :string
23+
# translations :jsonb not null
24+
# visible :boolean default(FALSE)
25+
# created_at :datetime not null
26+
# updated_at :datetime not null
27+
# realty_asset_id :uuid not null
28+
#
29+
# Indexes
30+
#
31+
# index_pwb_spp_listings_on_noindex (noindex)
32+
# index_pwb_spp_listings_on_realty_asset_id (realty_asset_id)
33+
# index_pwb_spp_listings_on_spp_slug (spp_slug)
34+
# index_pwb_spp_listings_on_translations (translations) USING gin
35+
# index_pwb_spp_listings_unique_active (realty_asset_id,listing_type,active) UNIQUE WHERE (active = true)
36+
#
37+
# Foreign Keys
38+
#
39+
# fk_rails_... (realty_asset_id => pwb_realty_assets.id)
40+
#
341
FactoryBot.define do
442
factory :pwb_spp_listing, class: 'Pwb::SppListing' do
543
association :realty_asset, factory: :pwb_realty_asset

spec/models/pwb/message_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@
2525
# updated_at :datetime not null
2626
# client_id :integer
2727
# contact_id :integer
28+
# realty_asset_id :uuid
2829
# website_id :bigint
2930
#
3031
# Indexes
3132
#
32-
# index_pwb_messages_on_website_id (website_id)
33+
# index_pwb_messages_on_realty_asset_id (realty_asset_id)
34+
# index_pwb_messages_on_website_id (website_id)
3335
#
3436
# Foreign Keys
3537
#

spec/models/pwb/spp_listing_spec.rb

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,43 @@
11
# frozen_string_literal: true
22

3+
# == Schema Information
4+
#
5+
# Table name: pwb_spp_listings
6+
# Database name: primary
7+
#
8+
# id :uuid not null, primary key
9+
# active :boolean default(FALSE), not null
10+
# archived :boolean default(FALSE)
11+
# extra_data :jsonb
12+
# highlighted_features :jsonb
13+
# listing_type :string default("sale"), not null
14+
# live_url :string
15+
# noindex :boolean default(FALSE), not null
16+
# photo_ids_ordered :jsonb
17+
# price_cents :bigint default(0), not null
18+
# price_currency :string default("EUR"), not null
19+
# published_at :datetime
20+
# spp_settings :jsonb
21+
# spp_slug :string
22+
# template :string
23+
# translations :jsonb not null
24+
# visible :boolean default(FALSE)
25+
# created_at :datetime not null
26+
# updated_at :datetime not null
27+
# realty_asset_id :uuid not null
28+
#
29+
# Indexes
30+
#
31+
# index_pwb_spp_listings_on_noindex (noindex)
32+
# index_pwb_spp_listings_on_realty_asset_id (realty_asset_id)
33+
# index_pwb_spp_listings_on_spp_slug (spp_slug)
34+
# index_pwb_spp_listings_on_translations (translations) USING gin
35+
# index_pwb_spp_listings_unique_active (realty_asset_id,listing_type,active) UNIQUE WHERE (active = true)
36+
#
37+
# Foreign Keys
38+
#
39+
# fk_rails_... (realty_asset_id => pwb_realty_assets.id)
40+
#
341
require 'rails_helper'
442

543
module Pwb

0 commit comments

Comments
 (0)