seed generator

This commit is contained in:
Zoey
2019-06-18 13:35:15 +06:30
parent a0506f5a4e
commit 61166d615d
21 changed files with 139 additions and 37 deletions

View File

@@ -6,6 +6,11 @@ class CashierLoginLog < ApplicationRecord
private
def generate_custom_id
self.cashier_login_log_id = SeedGenerator.generate_id(self.class.name, "CLO")
prefix = "CLO"
if ENV["SERVER_MODE"] == 'cloud'
prefix = "CCLO"
end
self.cashier_login_log_id = SeedGenerator.generate_id(self.class.name, prefix)
end
end
end