This repository has been archived on 2025-05-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
shop/database/fakers/user_faker.go

23 lines
502 B
Go

package fakers
import (
"github.com/bxcodec/faker/v3"
"github.com/google/uuid"
"gorm.io/gorm"
"moretcgshop/app/models"
"time"
)
func UserFaker(db *gorm.DB) *models.User {
return &models.User{
ID: uuid.New().String(),
FirstName: faker.FirstName(),
LastName: faker.LastName(),
Email: faker.Email(),
Password: "$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi", // password
CreatedAt: time.Time{},
UpdatedAt: time.Time{},
DeletedAt: gorm.DeletedAt{},
}
}