Compare commits
No commits in common. "22c7e0cdb63c008ba2f76cdaba9b848c042325e4" and "2cc3c1a7dd5627536372b1e16708d340fbb290e0" have entirely different histories.
22c7e0cdb6
...
2cc3c1a7dd
28 changed files with 46 additions and 601 deletions
|
|
@ -1,65 +0,0 @@
|
|||
---
|
||||
:position: before
|
||||
:position_in_additional_file_patterns: before
|
||||
:position_in_class: before
|
||||
:position_in_factory: before
|
||||
:position_in_fixture: before
|
||||
:position_in_routes: before
|
||||
:position_in_serializer: before
|
||||
:position_in_test: before
|
||||
:classified_sort: true
|
||||
:exclude_controllers: true
|
||||
:exclude_factories: false
|
||||
:exclude_fixtures: false
|
||||
:exclude_helpers: true
|
||||
:exclude_scaffolds: true
|
||||
:exclude_serializers: false
|
||||
:exclude_sti_subclasses: false
|
||||
:exclude_tests: false
|
||||
:force: false
|
||||
:format_markdown: false
|
||||
:format_rdoc: false
|
||||
:format_yard: false
|
||||
:frozen: false
|
||||
:grouped_polymorphic: false
|
||||
:ignore_model_sub_dir: false
|
||||
:ignore_unknown_models: false
|
||||
:include_version: false
|
||||
:show_check_constraints: false
|
||||
:show_complete_foreign_keys: false
|
||||
:show_foreign_keys: true
|
||||
:show_indexes: true
|
||||
:show_indexes_include: false
|
||||
:simple_indexes: false
|
||||
:sort: false
|
||||
:timestamp: false
|
||||
:trace: false
|
||||
:with_comment: true
|
||||
:with_column_comments: true
|
||||
:with_table_comments: true
|
||||
:position_of_column_comment: :with_name
|
||||
:active_admin: false
|
||||
:command:
|
||||
:debug: false
|
||||
:hide_default_column_types: ''
|
||||
:hide_limit_column_types: ''
|
||||
:timestamp_columns:
|
||||
- created_at
|
||||
- updated_at
|
||||
:ignore_columns:
|
||||
:ignore_routes:
|
||||
:ignore_multi_database_name: false
|
||||
:models: true
|
||||
:routes: false
|
||||
:skip_on_db_migrate: false
|
||||
:target_action: :do_annotations
|
||||
:wrapper:
|
||||
:wrapper_close:
|
||||
:wrapper_open:
|
||||
:classes_default_to_s: []
|
||||
:additional_file_patterns: []
|
||||
:model_dir:
|
||||
- app/models
|
||||
:require: []
|
||||
:root_dir:
|
||||
- ''
|
||||
11
Gemfile
11
Gemfile
|
|
@ -2,8 +2,8 @@ source "https://rubygems.org"
|
|||
|
||||
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
|
||||
gem "rails", "~> 8.0.4"
|
||||
# Use pg as the database for Active Record
|
||||
gem "pg", "~> 1.5"
|
||||
# Use sqlite3 as the database for Active Record
|
||||
gem "sqlite3", ">= 2.1"
|
||||
# Use the Puma web server [https://github.com/puma/puma]
|
||||
gem "puma", ">= 5.0"
|
||||
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
|
||||
|
|
@ -44,9 +44,4 @@ group :development, :test do
|
|||
|
||||
# Omakase Ruby styling [https://github.com/rails/rubocop-rails-omakase/]
|
||||
gem "rubocop-rails-omakase", require: false
|
||||
|
||||
gem 'rails-erd', require: false
|
||||
|
||||
gem "annotaterb"
|
||||
gem "dotenv-rails"
|
||||
end
|
||||
end
|
||||
|
|
|
|||
33
Gemfile.lock
33
Gemfile.lock
|
|
@ -72,9 +72,6 @@ GEM
|
|||
securerandom (>= 0.3)
|
||||
tzinfo (~> 2.0, >= 2.0.5)
|
||||
uri (>= 0.13.1)
|
||||
annotaterb (4.22.0)
|
||||
activerecord (>= 6.0.0)
|
||||
activesupport (>= 6.0.0)
|
||||
ast (2.4.3)
|
||||
base64 (0.3.0)
|
||||
bcrypt_pbkdf (1.1.2)
|
||||
|
|
@ -85,7 +82,6 @@ GEM
|
|||
brakeman (8.0.4)
|
||||
racc
|
||||
builder (3.3.0)
|
||||
choice (0.2.0)
|
||||
concurrent-ruby (1.3.6)
|
||||
connection_pool (3.0.2)
|
||||
crass (1.0.6)
|
||||
|
|
@ -94,9 +90,6 @@ GEM
|
|||
irb (~> 1.10)
|
||||
reline (>= 0.3.8)
|
||||
dotenv (3.2.0)
|
||||
dotenv-rails (3.2.0)
|
||||
dotenv (= 3.2.0)
|
||||
railties (>= 6.1)
|
||||
drb (2.2.3)
|
||||
ed25519 (1.4.0)
|
||||
erb (6.0.4)
|
||||
|
|
@ -180,12 +173,6 @@ GEM
|
|||
parser (3.3.11.1)
|
||||
ast (~> 2.4.1)
|
||||
racc
|
||||
pg (1.6.3)
|
||||
pg (1.6.3-aarch64-linux)
|
||||
pg (1.6.3-aarch64-linux-musl)
|
||||
pg (1.6.3-arm64-darwin)
|
||||
pg (1.6.3-x86_64-linux)
|
||||
pg (1.6.3-x86_64-linux-musl)
|
||||
pp (0.6.3)
|
||||
prettyprint
|
||||
prettyprint (0.2.0)
|
||||
|
|
@ -223,11 +210,6 @@ GEM
|
|||
activesupport (>= 5.0.0)
|
||||
minitest
|
||||
nokogiri (>= 1.6)
|
||||
rails-erd (1.7.2)
|
||||
activerecord (>= 4.2)
|
||||
activesupport (>= 4.2)
|
||||
choice (~> 0.2.0)
|
||||
ruby-graphviz (~> 1.2)
|
||||
rails-html-sanitizer (1.7.0)
|
||||
loofah (~> 2.25)
|
||||
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
||||
|
|
@ -249,7 +231,6 @@ GEM
|
|||
regexp_parser (2.12.0)
|
||||
reline (0.6.3)
|
||||
io-console (~> 0.5)
|
||||
rexml (3.4.4)
|
||||
rubocop (1.86.2)
|
||||
json (~> 2.3)
|
||||
language_server-protocol (~> 3.17.0.2)
|
||||
|
|
@ -278,8 +259,6 @@ GEM
|
|||
rubocop (>= 1.72)
|
||||
rubocop-performance (>= 1.24)
|
||||
rubocop-rails (>= 2.30)
|
||||
ruby-graphviz (1.2.5)
|
||||
rexml
|
||||
ruby-progressbar (1.13.0)
|
||||
securerandom (0.4.1)
|
||||
solid_cable (3.0.12)
|
||||
|
|
@ -298,6 +277,13 @@ GEM
|
|||
fugit (~> 1.11)
|
||||
railties (>= 7.1)
|
||||
thor (>= 1.3.1)
|
||||
sqlite3 (2.9.4-aarch64-linux-gnu)
|
||||
sqlite3 (2.9.4-aarch64-linux-musl)
|
||||
sqlite3 (2.9.4-arm-linux-gnu)
|
||||
sqlite3 (2.9.4-arm-linux-musl)
|
||||
sqlite3 (2.9.4-arm64-darwin)
|
||||
sqlite3 (2.9.4-x86_64-linux-gnu)
|
||||
sqlite3 (2.9.4-x86_64-linux-musl)
|
||||
sshkit (1.25.0)
|
||||
base64
|
||||
logger
|
||||
|
|
@ -338,20 +324,17 @@ PLATFORMS
|
|||
x86_64-linux-musl
|
||||
|
||||
DEPENDENCIES
|
||||
annotaterb
|
||||
bootsnap
|
||||
brakeman
|
||||
debug
|
||||
dotenv-rails
|
||||
kamal
|
||||
pg (~> 1.5)
|
||||
puma (>= 5.0)
|
||||
rails (~> 8.0.4)
|
||||
rails-erd
|
||||
rubocop-rails-omakase
|
||||
solid_cable
|
||||
solid_cache
|
||||
solid_queue
|
||||
sqlite3 (>= 2.1)
|
||||
thruster
|
||||
tzinfo-data
|
||||
|
||||
|
|
|
|||
|
|
@ -1,17 +1,2 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: admins
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# email :string
|
||||
# name :string
|
||||
# password_digest :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_admins_on_email (email) UNIQUE
|
||||
#
|
||||
class Admin < ApplicationRecord
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,12 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: chains
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# name :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
class Chain < ApplicationRecord
|
||||
has_one_attached :image
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,12 +1,2 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: guests
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# name :string
|
||||
# username :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
class Guest < ApplicationRecord
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,24 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: moderation_logs
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# moderatable_type :string not null
|
||||
# reason :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# admin_id :integer not null
|
||||
# moderatable_id :integer not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_moderation_logs_on_admin_id (admin_id)
|
||||
# index_moderation_logs_on_moderatable (moderatable_type,moderatable_id)
|
||||
#
|
||||
# Foreign Keys
|
||||
#
|
||||
# fk_rails_... (admin_id => admins.id)
|
||||
#
|
||||
class ModerationLog < ApplicationRecord
|
||||
belongs_to :moderatable, polymorphic: true
|
||||
belongs_to :admin
|
||||
|
|
|
|||
|
|
@ -1,31 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: price_reports
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# discount_price :decimal(, )
|
||||
# downvotes :integer
|
||||
# price :decimal(, )
|
||||
# reported_at :datetime
|
||||
# upvotes :integer
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# guest_id :integer not null
|
||||
# product_id :integer not null
|
||||
# store_id :integer not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_price_reports_on_guest_id (guest_id)
|
||||
# index_price_reports_on_product_id (product_id)
|
||||
# index_price_reports_on_store_id (store_id)
|
||||
#
|
||||
# Foreign Keys
|
||||
#
|
||||
# fk_rails_... (guest_id => guests.id)
|
||||
# fk_rails_... (product_id => products.id)
|
||||
# fk_rails_... (store_id => stores.id)
|
||||
#
|
||||
class PriceReport < ApplicationRecord
|
||||
belongs_to :product
|
||||
belongs_to :store
|
||||
|
|
|
|||
|
|
@ -1,17 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: products
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# barcode :string
|
||||
# name :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_products_on_barcode (barcode) UNIQUE
|
||||
#
|
||||
class Product < ApplicationRecord
|
||||
has_one_attached :image
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,23 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: stores
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# latitude :float
|
||||
# longitude :float
|
||||
# name :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# chain_id :integer not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_stores_on_chain_id (chain_id)
|
||||
#
|
||||
# Foreign Keys
|
||||
#
|
||||
# fk_rails_... (chain_id => chains.id)
|
||||
#
|
||||
class Store < ApplicationRecord
|
||||
has_one_attached :image
|
||||
belongs_to :chain
|
||||
|
|
|
|||
|
|
@ -1,20 +1,41 @@
|
|||
# SQLite. Versions 3.8.0 and up are supported.
|
||||
# gem install sqlite3
|
||||
#
|
||||
# Ensure the SQLite 3 gem is defined in your Gemfile
|
||||
# gem "sqlite3"
|
||||
#
|
||||
default: &default
|
||||
adapter: postgresql
|
||||
encoding: unicode
|
||||
adapter: sqlite3
|
||||
pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
|
||||
host: <%= ENV.fetch("DATABASE_HOST", "localhost") %>
|
||||
port: <%= ENV.fetch("DATABASE_PORT", 5432) %>
|
||||
username: <%= ENV.fetch("DATABASE_USER", "postgres") %>
|
||||
password: <%= ENV.fetch("DATABASE_PASSWORD", "password") %>
|
||||
timeout: 5000
|
||||
|
||||
development:
|
||||
<<: *default
|
||||
database: price_point_development
|
||||
database: storage/development.sqlite3
|
||||
|
||||
# Warning: The database defined as "test" will be erased and
|
||||
# re-generated from your development database when you run "rake".
|
||||
# Do not set this db to the same as development or production.
|
||||
test:
|
||||
<<: *default
|
||||
database: price_point_test
|
||||
database: storage/test.sqlite3
|
||||
|
||||
|
||||
# Store production database in the storage/ directory, which by default
|
||||
# is mounted as a persistent Docker volume in config/deploy.yml.
|
||||
production:
|
||||
<<: *default
|
||||
database: price_point_production
|
||||
primary:
|
||||
<<: *default
|
||||
database: storage/production.sqlite3
|
||||
cache:
|
||||
<<: *default
|
||||
database: storage/production_cache.sqlite3
|
||||
migrations_paths: db/cache_migrate
|
||||
queue:
|
||||
<<: *default
|
||||
database: storage/production_queue.sqlite3
|
||||
migrations_paths: db/queue_migrate
|
||||
cable:
|
||||
<<: *default
|
||||
database: storage/production_cable.sqlite3
|
||||
migrations_paths: db/cable_migrate
|
||||
|
|
|
|||
119
db/schema.rb
generated
119
db/schema.rb
generated
|
|
@ -1,119 +0,0 @@
|
|||
# This file is auto-generated from the current state of the database. Instead
|
||||
# of editing this file, please use the migrations feature of Active Record to
|
||||
# incrementally modify your database, and then regenerate this schema definition.
|
||||
#
|
||||
# This file is the source Rails uses to define your schema when running `bin/rails
|
||||
# db:schema:load`. When creating a new database, `bin/rails db:schema:load` tends to
|
||||
# be faster and is potentially less error prone than running all of your
|
||||
# migrations from scratch. Old migrations may fail to apply correctly if those
|
||||
# migrations use external dependencies or application code.
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.0].define(version: 2026_05_17_111138) do
|
||||
# These are extensions that must be enabled in order to support this database
|
||||
enable_extension "pg_catalog.plpgsql"
|
||||
|
||||
create_table "active_storage_attachments", force: :cascade do |t|
|
||||
t.string "name", null: false
|
||||
t.string "record_type", null: false
|
||||
t.bigint "record_id", null: false
|
||||
t.bigint "blob_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.index ["blob_id"], name: "index_active_storage_attachments_on_blob_id"
|
||||
t.index ["record_type", "record_id", "name", "blob_id"], name: "index_active_storage_attachments_uniqueness", unique: true
|
||||
end
|
||||
|
||||
create_table "active_storage_blobs", force: :cascade do |t|
|
||||
t.string "key", null: false
|
||||
t.string "filename", null: false
|
||||
t.string "content_type"
|
||||
t.text "metadata"
|
||||
t.string "service_name", null: false
|
||||
t.bigint "byte_size", null: false
|
||||
t.string "checksum"
|
||||
t.datetime "created_at", null: false
|
||||
t.index ["key"], name: "index_active_storage_blobs_on_key", unique: true
|
||||
end
|
||||
|
||||
create_table "active_storage_variant_records", force: :cascade do |t|
|
||||
t.bigint "blob_id", null: false
|
||||
t.string "variation_digest", null: false
|
||||
t.index ["blob_id", "variation_digest"], name: "index_active_storage_variant_records_uniqueness", unique: true
|
||||
end
|
||||
|
||||
create_table "admins", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "email"
|
||||
t.string "password_digest"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["email"], name: "index_admins_on_email", unique: true
|
||||
end
|
||||
|
||||
create_table "chains", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "guests", force: :cascade do |t|
|
||||
t.string "username"
|
||||
t.string "name"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
end
|
||||
|
||||
create_table "moderation_logs", force: :cascade do |t|
|
||||
t.string "reason"
|
||||
t.string "moderatable_type", null: false
|
||||
t.integer "moderatable_id", null: false
|
||||
t.integer "admin_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["admin_id"], name: "index_moderation_logs_on_admin_id"
|
||||
t.index ["moderatable_type", "moderatable_id"], name: "index_moderation_logs_on_moderatable"
|
||||
end
|
||||
|
||||
create_table "price_reports", force: :cascade do |t|
|
||||
t.decimal "price"
|
||||
t.decimal "discount_price"
|
||||
t.integer "upvotes"
|
||||
t.integer "downvotes"
|
||||
t.datetime "reported_at"
|
||||
t.integer "product_id", null: false
|
||||
t.integer "store_id", null: false
|
||||
t.integer "guest_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["guest_id"], name: "index_price_reports_on_guest_id"
|
||||
t.index ["product_id"], name: "index_price_reports_on_product_id"
|
||||
t.index ["store_id"], name: "index_price_reports_on_store_id"
|
||||
end
|
||||
|
||||
create_table "products", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "barcode"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["barcode"], name: "index_products_on_barcode", unique: true
|
||||
end
|
||||
|
||||
create_table "stores", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.float "latitude"
|
||||
t.float "longitude"
|
||||
t.integer "chain_id", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["chain_id"], name: "index_stores_on_chain_id"
|
||||
end
|
||||
|
||||
add_foreign_key "active_storage_attachments", "active_storage_blobs", column: "blob_id"
|
||||
add_foreign_key "active_storage_variant_records", "active_storage_blobs", column: "blob_id"
|
||||
add_foreign_key "moderation_logs", "admins"
|
||||
add_foreign_key "price_reports", "guests"
|
||||
add_foreign_key "price_reports", "products"
|
||||
add_foreign_key "price_reports", "stores"
|
||||
add_foreign_key "stores", "chains"
|
||||
end
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
services:
|
||||
db:
|
||||
image: postgres:17
|
||||
environment:
|
||||
POSTGRES_USER: postgres
|
||||
POSTGRES_PASSWORD: password
|
||||
ports:
|
||||
- "5432:5432"
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
# This rake task was added by annotate_rb gem.
|
||||
|
||||
# Can set `ANNOTATERB_SKIP_ON_DB_TASKS` to be anything to skip this
|
||||
if Rails.env.development? && ENV["ANNOTATERB_SKIP_ON_DB_TASKS"].nil?
|
||||
require "annotate_rb"
|
||||
|
||||
# Can modify the config path here if needed - by default, it's .annotaterb.yml in the root of the project
|
||||
# AnnotateRb::ConfigFinder.config_path = ""
|
||||
AnnotateRb::Core.load_rake_tasks
|
||||
end
|
||||
15
test/fixtures/admins.yml
vendored
15
test/fixtures/admins.yml
vendored
|
|
@ -1,20 +1,5 @@
|
|||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: admins
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# email :string
|
||||
# name :string
|
||||
# password_digest :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_admins_on_email (email) UNIQUE
|
||||
#
|
||||
one:
|
||||
name: MyString
|
||||
email: MyString
|
||||
|
|
|
|||
9
test/fixtures/chains.yml
vendored
9
test/fixtures/chains.yml
vendored
|
|
@ -1,14 +1,5 @@
|
|||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: chains
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# name :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
one:
|
||||
name: MyString
|
||||
|
||||
|
|
|
|||
10
test/fixtures/guests.yml
vendored
10
test/fixtures/guests.yml
vendored
|
|
@ -1,15 +1,5 @@
|
|||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: guests
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# name :string
|
||||
# username :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
one:
|
||||
username: MyString
|
||||
name: MyString
|
||||
|
|
|
|||
21
test/fixtures/moderation_logs.yml
vendored
21
test/fixtures/moderation_logs.yml
vendored
|
|
@ -1,26 +1,5 @@
|
|||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: moderation_logs
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# moderatable_type :string not null
|
||||
# reason :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# admin_id :integer not null
|
||||
# moderatable_id :integer not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_moderation_logs_on_admin_id (admin_id)
|
||||
# index_moderation_logs_on_moderatable (moderatable_type,moderatable_id)
|
||||
#
|
||||
# Foreign Keys
|
||||
#
|
||||
# fk_rails_... (admin_id => admins.id)
|
||||
#
|
||||
one:
|
||||
reason: MyString
|
||||
moderatable: one
|
||||
|
|
|
|||
28
test/fixtures/price_reports.yml
vendored
28
test/fixtures/price_reports.yml
vendored
|
|
@ -1,33 +1,5 @@
|
|||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: price_reports
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# discount_price :decimal(, )
|
||||
# downvotes :integer
|
||||
# price :decimal(, )
|
||||
# reported_at :datetime
|
||||
# upvotes :integer
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# guest_id :integer not null
|
||||
# product_id :integer not null
|
||||
# store_id :integer not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_price_reports_on_guest_id (guest_id)
|
||||
# index_price_reports_on_product_id (product_id)
|
||||
# index_price_reports_on_store_id (store_id)
|
||||
#
|
||||
# Foreign Keys
|
||||
#
|
||||
# fk_rails_... (guest_id => guests.id)
|
||||
# fk_rails_... (product_id => products.id)
|
||||
# fk_rails_... (store_id => stores.id)
|
||||
#
|
||||
one:
|
||||
price: 9.99
|
||||
discount_price: 9.99
|
||||
|
|
|
|||
18
test/fixtures/products.yml
vendored
18
test/fixtures/products.yml
vendored
|
|
@ -1,19 +1,9 @@
|
|||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: products
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# barcode :string
|
||||
# name :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_products_on_barcode (barcode) UNIQUE
|
||||
#
|
||||
one:
|
||||
name: MyString
|
||||
barcode: MyString
|
||||
|
||||
two:
|
||||
name: MyString
|
||||
barcode: MyString
|
||||
|
|
|
|||
20
test/fixtures/stores.yml
vendored
20
test/fixtures/stores.yml
vendored
|
|
@ -1,25 +1,5 @@
|
|||
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
|
||||
|
||||
# == Schema Information
|
||||
#
|
||||
# Table name: stores
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# latitude :float
|
||||
# longitude :float
|
||||
# name :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# chain_id :integer not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_stores_on_chain_id (chain_id)
|
||||
#
|
||||
# Foreign Keys
|
||||
#
|
||||
# fk_rails_... (chain_id => chains.id)
|
||||
#
|
||||
one:
|
||||
name: MyString
|
||||
latitude: 1.5
|
||||
|
|
|
|||
|
|
@ -1,18 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: admins
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# email :string
|
||||
# name :string
|
||||
# password_digest :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_admins_on_email (email) UNIQUE
|
||||
#
|
||||
require "test_helper"
|
||||
|
||||
class AdminTest < ActiveSupport::TestCase
|
||||
|
|
|
|||
|
|
@ -1,12 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: chains
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# name :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
require "test_helper"
|
||||
|
||||
class ChainTest < ActiveSupport::TestCase
|
||||
|
|
|
|||
|
|
@ -1,13 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: guests
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# name :string
|
||||
# username :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
require "test_helper"
|
||||
|
||||
class GuestTest < ActiveSupport::TestCase
|
||||
|
|
|
|||
|
|
@ -1,24 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: moderation_logs
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# moderatable_type :string not null
|
||||
# reason :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# admin_id :integer not null
|
||||
# moderatable_id :integer not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_moderation_logs_on_admin_id (admin_id)
|
||||
# index_moderation_logs_on_moderatable (moderatable_type,moderatable_id)
|
||||
#
|
||||
# Foreign Keys
|
||||
#
|
||||
# fk_rails_... (admin_id => admins.id)
|
||||
#
|
||||
require "test_helper"
|
||||
|
||||
class ModerationLogTest < ActiveSupport::TestCase
|
||||
|
|
|
|||
|
|
@ -1,31 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: price_reports
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# discount_price :decimal(, )
|
||||
# downvotes :integer
|
||||
# price :decimal(, )
|
||||
# reported_at :datetime
|
||||
# upvotes :integer
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# guest_id :integer not null
|
||||
# product_id :integer not null
|
||||
# store_id :integer not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_price_reports_on_guest_id (guest_id)
|
||||
# index_price_reports_on_product_id (product_id)
|
||||
# index_price_reports_on_store_id (store_id)
|
||||
#
|
||||
# Foreign Keys
|
||||
#
|
||||
# fk_rails_... (guest_id => guests.id)
|
||||
# fk_rails_... (product_id => products.id)
|
||||
# fk_rails_... (store_id => stores.id)
|
||||
#
|
||||
require "test_helper"
|
||||
|
||||
class PriceReportTest < ActiveSupport::TestCase
|
||||
|
|
|
|||
|
|
@ -1,17 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: products
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# barcode :string
|
||||
# name :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_products_on_barcode (barcode) UNIQUE
|
||||
#
|
||||
require "test_helper"
|
||||
|
||||
class ProductTest < ActiveSupport::TestCase
|
||||
|
|
|
|||
|
|
@ -1,23 +1,3 @@
|
|||
# == Schema Information
|
||||
#
|
||||
# Table name: stores
|
||||
#
|
||||
# id :bigint not null, primary key
|
||||
# latitude :float
|
||||
# longitude :float
|
||||
# name :string
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
# chain_id :integer not null
|
||||
#
|
||||
# Indexes
|
||||
#
|
||||
# index_stores_on_chain_id (chain_id)
|
||||
#
|
||||
# Foreign Keys
|
||||
#
|
||||
# fk_rails_... (chain_id => chains.id)
|
||||
#
|
||||
require "test_helper"
|
||||
|
||||
class StoreTest < ActiveSupport::TestCase
|
||||
|
|
|
|||
Loading…
Reference in a new issue