I am batman
This commit is contained in:
27
services/user-service/internal/models/models.go
Normal file
27
services/user-service/internal/models/models.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type Client struct {
|
||||
gorm.Model
|
||||
Name string
|
||||
Email string `gorm:"uniqueIndex;not null"`
|
||||
Active bool `gorm:"default:true"`
|
||||
Address string
|
||||
}
|
||||
|
||||
type User struct {
|
||||
gorm.Model
|
||||
Email string `gorm:"uniqueIndex;not null"`
|
||||
Name string
|
||||
Role string `gorm:"default:User"`
|
||||
Active bool `gorm:"default:true"`
|
||||
Username string `gorm:"uniqueIndex"`
|
||||
Address string
|
||||
PhoneNumber string
|
||||
ProfilePhoto []byte `gorm:"type:bytea"`
|
||||
ClientID *uint
|
||||
Client *Client
|
||||
}
|
||||
Reference in New Issue
Block a user