preorder/formats/models.go

24 lines
444 B
Go
Raw Permalink Normal View History

2024-06-20 02:49:55 +00:00
package formats
2024-06-18 04:37:32 +00:00
type Format struct {
ID uint `json:"id" gorm:"primary_key"`
Format string `json:"format"`
}
type CreateFormatInput struct {
ID uint `json:"id" binding:"required"`
Format string `json:"format" binding:"required"`
}
type UpdateFormatInput struct {
Format string `json:"format"`
}
2024-06-19 02:59:35 +00:00
func NewFormat(id uint, format_name string) Format {
format := Format{
ID: id,
Format: format_name,
}
return format
}