2025-03-10 10:28:23 +08:00

19 lines
493 B
Go

package adsdomain
import (
"time"
)
type Ads struct {
ID string `gorm:"primaryKey;not null" json:"id"`
ImageUrl string `gorm:"not null" json:"image_url"`
Url string `gorm:"not null" json:"url"`
CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"created_at"`
UpdatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP" json:"updated_at"`
}
type AdsReq struct {
Image string `json:"image" validate:"required"`
URL string `json:"url" validate:"required"`
}