Implemented common parameter validation

This commit is contained in:
Deluan
2016-03-03 14:14:15 -05:00
parent 053f4b72ba
commit 18b784f494
5 changed files with 18 additions and 12 deletions
+5
View File
@@ -2,6 +2,7 @@ package domain
import (
"time"
"mime"
)
type MediaFile struct {
@@ -27,6 +28,10 @@ type MediaFile struct {
UpdatedAt time.Time
}
func (mf *MediaFile) ContentType() string {
return mime.TypeByExtension("." + mf.Suffix)
}
type MediaFileRepository interface {
BaseRepository
Put(m *MediaFile) error