debt-manager/app/models/bubble.rb
Louis Vallat edf60e9557
feat: added spendings for bubbles
Signed-off-by: Louis Vallat <louis@louis-vallat.xyz>
2023-12-31 19:06:33 +01:00

26 lines
665 B
Ruby

# == Schema Information
#
# Table name: bubbles
#
# id :uuid not null, primary key
# color :string default("#0000ff"), not null
# description :text default(""), not null
# name :string not null
# created_at :datetime not null
# updated_at :datetime not null
# owner_id :uuid not null
#
# Indexes
#
# index_bubbles_on_owner_id (owner_id)
#
# Foreign Keys
#
# fk_rails_... (owner_id => users.id)
#
class Bubble < ApplicationRecord
validates :name, presence: true, allow_blank: false
belongs_to :owner, class_name: "User"
has_many :spendings
end