17 lines
490 B
Go
17 lines
490 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type User struct {
|
|
ID uint `json:"id" gorm:"primaryKey"`
|
|
Username string `json:"username" gorm:"unique;not null"`
|
|
Email string `json:"email" gorm:"unique;not null"`
|
|
Password string `json:"-" gorm:"not null"` // Don't include in JSON responses
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
DeletedAt gorm.DeletedAt `json:"-" gorm:"index"`
|
|
} |