add: locales for server errors

This commit is contained in:
Alex
2024-10-09 18:01:43 +02:00
parent 4de5a54cac
commit 451e42a1fc
2 changed files with 37 additions and 5 deletions

View File

@@ -2,12 +2,10 @@ package models
import (
"time"
"gorm.io/gorm"
)
type DriversLicence struct {
gorm.Model
ID uint `json:"id" gorm:"primaryKey"`
Status int8 `json:"status" validate:"omitempty,number"`
LicenceNumber string `json:"number" validate:"omitempty,euDriversLicence,safe_content"`
IssuedDate time.Time `json:"issued_date" validate:"omitempty,lte"`
@@ -17,6 +15,6 @@ type DriversLicence struct {
}
type LicenceCategory struct {
gorm.Model
ID uint `json:"id" gorm:"primaryKey"`
Category string `json:"category" validate:"safe_content"`
}