Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

9.1 Seed User Model #31

Open
3 tasks
siyunfeng opened this issue Nov 8, 2022 · 0 comments
Open
3 tasks

9.1 Seed User Model #31

siyunfeng opened this issue Nov 8, 2022 · 0 comments
Assignees

Comments

@siyunfeng
Copy link
Contributor

siyunfeng commented Nov 8, 2022

Essential for #26

User Faker.js to generate fake data for seeding
https://fakerjs.dev/guide
https://github.com/faker-js/faker

  • npm install --save-dev @faker-js/faker
  • use faker for user
  • seed user's cart (item quanity should be 1 or above)
import { faker } from '@faker-js/faker';
    export function createRandomUser(): User {
    return {
    username: faker.internet.userName(),
    email: faker.internet.email(),
    <!-- avatar: faker.image.avatar(), -->
​
    password: faker.internet.password(),
    <!-- registeredAt: faker.date.past(), -->
​
    };
    }
@alliebug alliebug changed the title 7.1 Seed User Model 9.1 Seed User Model Nov 8, 2022
@alliebug alliebug self-assigned this Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants