Middlewares

This commit is contained in:
cdricms
2025-01-16 14:12:32 +01:00
parent 9a6e4a7565
commit 9bbd992e95
10 changed files with 238 additions and 39 deletions

View File

@@ -40,7 +40,7 @@ type User struct {
FirstName string `bun:"firstname,notnull" json:"firstname"`
LastName string `bun:"lastname,notnull" json:"lastname"`
Email string `bun:"email,unique,notnull" json:"email"`
Password string `bun:"password,notnull" json:"password"`
Password string `bun:"password,notnull" json:"password,omitempty"`
Phone string `bun:"phone,notnull" json:"phone"`
Role Role `bun:"role,notnull,default:'user'" json:"role"`
CreatedAt time.Time `bun:"created_at,default:current_timestamp" json:"createdAt"`