Commit 04c3d4e2 by ivan Lan

Add merchant_remark, customer_remark and mark to order

parent 9b70d4da
......@@ -39,7 +39,9 @@ class CreateShotengaiProductsAndOrders < ActiveRecord::Migration[5.1]
t.datetime :receipt_time
t.string :delivery_way
t.string :delivery_cost
t.text :merchant_remark
t.string :mark # merchant mark, like red, blue ..
t.text :customer_remark
t.string :status
t.string :type
t.json :meta
......
......@@ -38,9 +38,9 @@ module Shotengai
raise 'Illegal role. Only merchant or customer' unless role.in?(['merchant', 'customer'])
@controller_prefix = options[:namespace].blank? ? '' : (options[:namespace].camelize + '::')
{
'products' => options[:product],z
# orders: order,
# series: "#{Product}Series"
'products' => options[:product],
'orders' => options[:order],
'product_series' => "#{options[:product]}Series"
}.each do |key, klass_name|
@key, @klass_name = key, klass_name
template "#{role}/#{@key}_controller.rb",
......
......@@ -11,6 +11,9 @@ module Shotengai
# receipt_time :datetime
# delivery_way :string(255)
# delivery_cost :string(255)
# merchant_remark :text(65535)
# mark :string(255)
# customer_remark :text(65535)
# status :string(255)
# type :string(255)
# meta :json
......@@ -38,6 +41,7 @@ module Shotengai
}.each { |name, options|
event(name) { transitions options }
}
end
def fill_snapshot
......
......@@ -10,6 +10,9 @@
# receipt_time :datetime
# delivery_way :string(255)
# delivery_cost :string(255)
# merchant_remark :text(65535)
# mark :string(255)
# customer_remark :text(65535)
# status :string(255)
# type :string(255)
# meta :json
......@@ -18,7 +21,6 @@
# created_at :datetime not null
# updated_at :datetime not null
#
FactoryGirl.define do
factory :shotengai_order do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment