package models

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

type Materi struct {
	ID         uint64 `gorm:"default:0;"`
	Nama       string `gorm:"size:32; not null;"`
	Deskripsi  string `gorm:"size:32; not null;"`
	Kode_MK    string //foreign key tabel MK
	MataKuliah MataKuliah
}

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

}
