Files
kontor/kontor-gin/internal/models/artist.go
T

23 lines
771 B
Go

package models
import "time"
type Artist struct {
ID string `gorm:"type:string;primary_key;" json:"id"`
CreatedAt time.Time `gorm:"column:created_date" json:"created_date"`
UpdatedAt time.Time `gorm:"column:last_modified_date" json:"last_modified_date"`
DeletedAt *time.Time `gorm:"column:deleted_date" json:"deleted_date"`
Version int `gorm:"default:0" json:"version"`
Name string `gorm:"uniqueIndex" json:"name"`
WebLink string `gorm:"column:weblink" json:"weblink"`
}
func (artist *Artist) TableName() string {
return "artist"
}
type CreateArtistDTO struct {
Name string `json:"name" binding:"required"`
WebLink string `json:"weblink" binding:"required"`
}