Feat: add Ids and phone nos.

This commit is contained in:
Sallu9007
2025-03-23 16:46:04 +05:30
parent 2e5f02fdea
commit b572fd8bf2
3 changed files with 13 additions and 0 deletions

View File

@@ -17,6 +17,10 @@ return new class extends Migration
$table->string('email')->unique();
$table->timestamp('email_verified_at')->nullable();
$table->string('password');
$table->string('orcid_id', 19)->unique()->nullable(); // ORCID iD
$table->string('scopus_id', 20)->unique()->nullable(); // Scopus ID
$table->string('mobile_no', 15)->nullable(); // Mobile Number
$table->string('extension', 10)->nullable(); // Extension (Tel)
$table->rememberToken();
$table->timestamps();
});

View File

@@ -27,6 +27,10 @@ class UsersTableSeeder extends Seeder
'email' => 'user' . $i . '@example.com', // Unique email
'email_verified_at' => null, // Email not verified
'password' => Hash::make('password123'), // Default hashed password
'orcid_id' => sprintf('%04d-%04d-%04d-%04d', rand(1000, 9999), rand(1000, 9999), rand(1000, 9999), rand(1000, 9999)), // Fake ORCID iD
'scopus_id' => rand(10000000000, 99999999999), // Random 11-digit Scopus ID
'mobile_no' => '+91' . rand(6000000000, 9999999999), // Random Indian mobile number
'extension' => rand(1000, 9999), // 4-digit extension
'remember_token' => null, // Null for remember token
]);
}