20 lines
444 B
Go
20 lines
444 B
Go
package models
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type CustomerDB struct {
|
|
ID int64 `gorm:"primaryKey;column:id"`
|
|
Name string `gorm:"column:name"`
|
|
Email string `gorm:"column:email"`
|
|
Phone string `gorm:"column:phone"`
|
|
Points int `gorm:"column:points"`
|
|
CreatedAt time.Time `gorm:"column:created_at"`
|
|
UpdatedAt time.Time `gorm:"column:updated_at"`
|
|
}
|
|
|
|
func (CustomerDB) TableName() string {
|
|
return "customers"
|
|
}
|