@@ -0,0 +1,29 @@
+# encoding: utf-8
+class Employ < ActiveRecord::Base
+ self.table_name = "employ"
+ validates :mobile,:user_name,presence: true
+
+ rails_admin do
+ navigation_label '食堂管理'
+ weight -500
+ list do
+ filters [:mobile]
+ field :id
+ field :user_name
+ field :mobile
+ field :created_at
+ # field :updated_at
+ end
+ show do
+ field :updated_at
+ edit do
+end
@@ -0,0 +1,41 @@
+class ForbidDate < ActiveRecord::Base
+ self.table_name = "forbid_date"
+ validates :forbid_date,:type,presence: true
+ TYPE_ENUM = [["早餐",1],["中餐",2],["晚餐",3]]
+ filters [:type]
+ field :forbid_date
+ field :type, :enum do
+ filterable true
+ enum do
+ TYPE_ENUM
+ field :type
@@ -111,7 +111,7 @@ RailsAdmin.config do |config|
end
export
import do
- only ["UpdateOrder","LiveAward","Order","OrderDetail"]
+ only ["UpdateOrder","LiveAward","Order","OrderDetail","Employ"]
history_index do
# PAPER_TRAIL_AUDIT_MODEL
@@ -0,0 +1,10 @@
+zh-CN:
+ activerecord:
+ models:
+ employ: 就餐职员管理
+ attributes:
+ employ:
+ mobile: 手机号码
+ user_name: 职工姓名
+ created_at: 创建时间
+ updated_at: 更新时间
+ forbid_date: 非就餐日期配置
+ forbid_date:
+ forbid_date: 日期
+ type: 类型