package models

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

type Leaderboard struct {
	ID        uint64 `gorm:"default:0;"`
	Skor      uint64 `gorm:"default:0;"`
	ID_materi uint64 `gorm:"default:0;"`
	ID_player uint64 `gorm:"default:0;"`

	Mahasiswa Mahasiswa
}

func (m *Leaderboard) Validate(v *revel.Validation) {
	v.Required(m.Skor).Message("Skor tidak boleh kosong")
	v.Required(m.ID_materi).Message("ID Materi tidak boleh kosong")
	v.Required(m.ID_player).Message("ID Player tidak boleh kosong")

}
