Files
projet_gestion_commande/backend/gestion/models/user.go
T
2026-03-28 17:00:00 +01:00

15 lines
544 B
Go

package models
import "time"
type User struct {
ID int `json:"id" gorm:"primaryKey;autoIncrement"`
Username string `json:"username" gorm:"column:username;uniqueIndex"`
Password string `json:"password,omitempty" gorm:"column:password"`
Role string `json:"role" gorm:"column:role"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
}
func (User) TableName() string { return "users" }