add templates media_links.html and media_detail.html for kontor-gin
This commit is contained in:
@@ -24,6 +24,27 @@ func (media_video *MediaVideo) TableName() string {
|
||||
return "media_video"
|
||||
}
|
||||
|
||||
func (media_music *MediaVideo) Update(update MediaVideoDTO) {
|
||||
media_music.CreatedAt = update.CreatedAt.Time
|
||||
media_music.UpdatedAt = time.Now()
|
||||
media_music.Version = media_music.Version + 1
|
||||
media_music.WebLink = update.WebLink
|
||||
media_music.Review = update.Review
|
||||
media_music.ShouldDownload = update.ShouldDownload
|
||||
media_music.Title = update.Title
|
||||
media_music.FileName = update.FileName
|
||||
}
|
||||
|
||||
type MediaVideoForm struct {
|
||||
Title string `form:"title" binding:"required"`
|
||||
Url string `form:"url" binding:"required"`
|
||||
}
|
||||
|
||||
func (form *MediaVideoForm) ConvertFormToMediaVideoDTO() MediaVideoDTO {
|
||||
media_video := MediaVideoDTO{}
|
||||
return media_video
|
||||
}
|
||||
|
||||
type MediaVideoDTO struct {
|
||||
ID string `json:"id" binding:"required"`
|
||||
CreatedAt helpers.KontorTime `json:"created_date"`
|
||||
|
||||
Reference in New Issue
Block a user