![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/lavocat.ca/private_html/scripts/ |
import { PrismaClient } from '@prisma/client';
const prisma = new PrismaClient();
async function main() {
// 1. Create Law Firm
const lawFirm = await prisma.lawFirm.upsert({
where: { name: 'Wee & Partners LLP' },
update: {},
create: {
name: 'Wee & Partners LLP',
shortName: 'Wee LLP',
address: '123 Justice Ave',
city: 'Bordeaux',
province: 'Nouvelle-Aquitaine',
postalCode: '33000',
phone: '+33 5 56 00 00 00',
email: 'contact@wee-llp.com',
website: 'https://wee-llp.com',
barRegistration: 'BR-2024-001',
foundedYear: 2010,
specializations: 'Criminal Law, Civil Law, Human Rights',
partnershipType: 'partner',
isActive: true,
},
});
// 2. Create Justin Wee (Lead Lawyer)
const justinWee = await prisma.user.upsert({
where: { email: 'justin.wee@wee-llp.com' },
update: {},
create: {
email: 'justin.wee@wee-llp.com',
name: 'Justin Wee',
password: 'changeme123', // Set a secure password in production!
role: 'LAWYER',
username: 'justinwee',
profilePicture: null,
bio: 'Founding partner and lead litigator at Wee & Partners LLP.',
title: 'Partner',
specialization: 'Criminal Law',
barNumber: 'WEE-2024-001',
yearsOfExperience: 15,
education: 'Université de Bordeaux, LLM',
certifications: 'Certified Criminal Law Specialist',
officeLocation: 'Bordeaux',
workPhone: '+33 5 56 00 00 01',
linkedinUrl: 'https://linkedin.com/in/justinwee',
websiteUrl: 'https://wee-llp.com/justinwee',
availability: 'Weekdays 9am-6pm',
timezone: 'Europe/Paris',
pronouns: 'he/him',
isProfilePublic: true,
hourlyRate: 250.0,
proBono: false,
averageRating: 4.9,
isVerified: true,
lawFirmId: lawFirm.id,
status: 'ACTIVE',
},
});
// 3. Create Team Members
const teamMembers = await Promise.all([
prisma.user.upsert({
where: { email: 'sophie.martin@wee-llp.com' },
update: {},
create: {
email: 'sophie.martin@wee-llp.com',
name: 'Sophie Martin',
password: 'changeme123',
role: 'LAWYER',
username: 'sophiemartin',
profilePicture: null,
bio: 'Senior associate specializing in civil litigation.',
title: 'Senior Associate',
specialization: 'Civil Law',
barNumber: 'WEE-2024-002',
yearsOfExperience: 10,
education: 'Université de Bordeaux, LLB',
certifications: 'Certified Civil Law Specialist',
officeLocation: 'Bordeaux',
workPhone: '+33 5 56 00 00 02',
linkedinUrl: 'https://linkedin.com/in/sophiemartin',
websiteUrl: 'https://wee-llp.com/sophiemartin',
availability: 'Weekdays 9am-6pm',
timezone: 'Europe/Paris',
pronouns: 'she/her',
isProfilePublic: true,
hourlyRate: 180.0,
proBono: true,
averageRating: 4.7,
isVerified: true,
lawFirmId: lawFirm.id,
status: 'ACTIVE',
},
}),
prisma.user.upsert({
where: { email: 'marc.durand@wee-llp.com' },
update: {},
create: {
email: 'marc.durand@wee-llp.com',
name: 'Marc Durand',
password: 'changeme123',
role: 'LAWYER',
username: 'marcdurand',
profilePicture: null,
bio: 'Junior associate focusing on human rights cases.',
title: 'Junior Associate',
specialization: 'Human Rights',
barNumber: 'WEE-2024-003',
yearsOfExperience: 3,
education: 'Université de Bordeaux, LLB',
certifications: 'Certified Human Rights Advocate',
officeLocation: 'Bordeaux',
workPhone: '+33 5 56 00 00 03',
linkedinUrl: 'https://linkedin.com/in/marcdurand',
websiteUrl: 'https://wee-llp.com/marcdurand',
availability: 'Weekdays 9am-6pm',
timezone: 'Europe/Paris',
pronouns: 'he/him',
isProfilePublic: true,
hourlyRate: 120.0,
proBono: true,
averageRating: 4.5,
isVerified: true,
lawFirmId: lawFirm.id,
status: 'ACTIVE',
},
})
]);
// 4. Create Bordeaux Case
await prisma.legalCase.upsert({
where: { caseNumber: 'BORDEAUX-2024-001' },
update: {},
create: {
title: 'Bordeaux Case',
description: 'A high-profile criminal case in Bordeaux requiring expert legal representation.',
caseNumber: 'BORDEAUX-2024-001',
caseType: 'Criminal',
status: 'ACTIVE',
jurisdiction: 'Bordeaux',
court: 'Tribunal de Bordeaux',
priority: 'high',
isPublic: true,
category: 'Criminal',
legalArea: 'Criminal Law',
urgencyLevel: 'URGENT',
viewCount: 0,
supporterCount: 0,
estimatedValue: 50000,
riskLevel: 'HIGH',
publicSummary: 'A public summary of the Bordeaux Case.',
tags: JSON.stringify(['criminal', 'bordeaux', 'urgent']),
leadLawyerId: justinWee.id,
createdBy: justinWee.id,
competitionType: 'AUCTION',
competitionDeadline: new Date(Date.now() + 7 * 24 * 60 * 60 * 1000), // 1 week from now
minimumBid: 1000,
currentHighestBid: 0,
totalBidders: 0,
averageBidAmount: 0,
},
});
console.log('Restoration complete: Justin Wee, his firm, team, and Bordeaux Case have been restored.');
}
main()
.catch((e) => {
console.error(e);
process.exit(1);
})
.finally(async () => {
await prisma.$disconnect();
});