Feat: add Ids and phone nos.
This commit is contained in:
@@ -23,8 +23,13 @@ class User extends Authenticatable
|
|||||||
'password',
|
'password',
|
||||||
'role_id',
|
'role_id',
|
||||||
'department_id',
|
'department_id',
|
||||||
|
'orcid_id',
|
||||||
|
'scopus_id',
|
||||||
|
'mobile_no',
|
||||||
|
'extension',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that should be hidden for serialization.
|
* The attributes that should be hidden for serialization.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ return new class extends Migration
|
|||||||
$table->string('email')->unique();
|
$table->string('email')->unique();
|
||||||
$table->timestamp('email_verified_at')->nullable();
|
$table->timestamp('email_verified_at')->nullable();
|
||||||
$table->string('password');
|
$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->rememberToken();
|
||||||
$table->timestamps();
|
$table->timestamps();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -27,6 +27,10 @@ class UsersTableSeeder extends Seeder
|
|||||||
'email' => 'user' . $i . '@example.com', // Unique email
|
'email' => 'user' . $i . '@example.com', // Unique email
|
||||||
'email_verified_at' => null, // Email not verified
|
'email_verified_at' => null, // Email not verified
|
||||||
'password' => Hash::make('password123'), // Default hashed password
|
'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
|
'remember_token' => null, // Null for remember token
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user