moved db indices to uint

This commit is contained in:
Alex
2024-09-29 20:58:42 +02:00
parent e0cc893493
commit 1ded8bee33
22 changed files with 90 additions and 85 deletions

View File

@@ -9,9 +9,7 @@ import (
)
type User struct {
UpdatedAt time.Time
DateOfBirth time.Time `gorm:"not null" json:"date_of_birth" validate:"required,age"`
CreatedAt time.Time
Company string `json:"company" validate:"omitempty,omitnil,safe_content"`
Phone string `json:"phone" validate:"omitempty,omitnil,safe_content"`
Notes *string `json:"notes,safe_content"`
@@ -31,6 +29,7 @@ type User struct {
PaymentStatus int8 `json:"payment_status"`
Status int8 `json:"status"`
RoleID int8 `json:"role_id"`
gorm.Model
}
// BeforeCreate sets the default value for Status