このコミットが含まれているのは:
2025-02-27 23:38:45 +09:00
コミット 137c86bba7
18個のファイルの変更156行の追加31行の削除
+12
ファイルの表示
@@ -0,0 +1,12 @@
class User < ApplicationRecord
validates :name, length: { maximum: 255 }
validates :inheritance_code, presence: true, length: { maximum: 64 }
validates :role, presence: true, inclusion: { in: roles.keys }
validates :banned, inclusion: { in: [true, false] }
enum role: { guest: 'guest', member: 'member', admin: 'admin' }
has_many :posts
has_many :settings
has_many :ip_addresses
end