Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToResponseSlice ¶
Types ¶
type BaseEntity ¶
type BaseEntity[E any] struct { RespInstance *E `gorm:"-"` }
func (*BaseEntity[E]) CopyToResponse ¶
func (b *BaseEntity[E]) CopyToResponse(source any) (*E, error)
type Image ¶
type Image struct {
BaseEntity[response.ImageResponse]
Id uint `gorm:"primaryKey"`
S3Key string `gorm:"size:255;not null"`
Url string `gorm:"size:512;not null"`
UserID *uint `gorm:"index"` // Указатель для nullable
Size int `gorm:""`
MimeType string `gorm:"size:50"`
ExpiresAt time.Time `gorm:""`
CreatedAt time.Time `gorm:"default:CURRENT_TIMESTAMP"`
}
func (Image) ToResponse ¶
func (a Image) ToResponse() (*response.ImageResponse, error)
Click to show internal directories.
Click to hide internal directories.