package models

import (
	"github.com/revel/revel"
	"github.com/jinzhu/gorm"
)

type Room struct {
	gorm.Model
	ID      uint64 `gorm:"default:0;"`
	Kode string `gorm:"size:32; not null;"`
	PlayerList string `gorm:"size:32; not null;"`
	KeyPlayer string `gorm:"size:32; not null;"`
	IDMateri     uint64 `gorm:"default:0;"`
}

func (m *Room) Validate(v *revel.Validation) {
	v.Required(m.Kode).Message("Kode tidak boleh kosong")

}
