szoe-pontok/model/model.go
2024-10-11 15:58:12 +02:00

19 lines
753 B
Go

package model
import "time"
type User struct {
Neptun string `db:"neptun" form:"neptun" validate:"required,len=6"`
Email string `db:"email" form:"email" validate:"required,email"`
Password string `db:"password_hash" form:"password" validate:"required,min=6,max=32"`
}
type Task struct {
ID int `db:"id" json:"id"`
Description string `db:"description" form:"description" json:"description"`
Points int `db:"points" form:"points" json:"points" validate:"required"`
Recipient string `db:"recipient" form:"recipient" json:"recipient" validate:"required,len=6"`
Issuer string `db:"issuer" form:"issuer" json:"issuer" validate:"len=6"`
CreatedDate time.Time `db:"created_date" json:"created_date"`
}