| Total Complexity | 1 |
| Complexity/F | 1 |
| Lines of Code | 23 |
| Function Count | 1 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import BaseSeeder from '@ioc:Adonis/Lucid/Seeder' |
||
| 2 | import Merchant from 'App/Models/Merchant' |
||
| 3 | import moment from 'moment' |
||
| 4 | import crypto from 'crypto' |
||
| 5 | |||
| 6 | export default class extends BaseSeeder { |
||
| 7 | public async run () { |
||
| 8 | // Write your database queries inside the run method |
||
| 9 | await Merchant.firstOrCreate( |
||
| 10 | { |
||
| 11 | email: '[email protected]' |
||
| 12 | }, |
||
| 13 | { |
||
| 14 | name: 'Test Merchant', |
||
| 15 | email: '[email protected]', |
||
| 16 | emailVerifiedAt: moment().format('YYYY-MM-DD HH:mm:ss'), |
||
| 17 | password: '12345678', |
||
| 18 | rememberMeToken: crypto.randomBytes(20).toString('hex'), |
||
| 19 | isMerchant: true, |
||
| 20 | }) |
||
| 21 | } |
||
| 22 | } |
||
| 23 |