Implemented common parameter validation
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user