Sha256: c08117e9aa9b922b61889fb988b25ce8004525976ac27a92d05a171ac0e3a565
Contents?: true
Size: 561 Bytes
Versions: 10
Compression:
Stored size: 561 Bytes
Contents
# frozen_string_literal: true require_relative "spec_helper" require "sequel" Sequel::Model.plugin :timestamps DB = Sequel.sqlite DB.create_table :s_products do primary_key :id String :name String :slug Integer :s_category_id Integer :price DateTime :created_at DateTime :updated_at end DB.create_table :s_categories do primary_key :id String :title String :slug DateTime :created_at DateTime :updated_at end class SProduct < Sequel::Model many_to_one :s_category end class SCategory < Sequel::Model one_to_many :s_product end
Version data entries
10 entries across 10 versions & 1 rubygems