models

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Author

type Author struct {
	ID        uint64 `json:"id" gorm:"primaryKey;autoIncrement;->"`
	Firstname string `json:"firstname" gorm:"size:255" validate:"required,min=1,max=255"`
	Surname   string `json:"surname" gorm:"size:255" validate:"required,min=1,max=255"`
}

Author represents an author entity with ID, Firstname, and Surname.

func (*Author) Validate

func (a *Author) Validate(v *validator.Validate) error

Validate validates the Author struct based on defined validation tags.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL