This commit is contained in:
freedakgmail
2025-11-29 22:29:48 +08:00
parent d22f1fb889
commit b436ae0680
153 changed files with 302 additions and 270 deletions
+18 -2
View File
@@ -16,6 +16,18 @@ async function main() {
console.log('数据库清理完成')
console.log('开始创建测试用户和家族树...')
// 创建管理员账号
const adminHashedPassword = await bcrypt.hash('why701208', 10)
const adminUser = await prisma.user.create({
data: {
email: 'freedak@163.com',
name: '管理员',
password: adminHashedPassword,
isAdmin: true,
},
})
console.log('✓ 创建管理员账号: freedak@163.com')
// 创建用户1: 王先生
const hashedPassword1 = await bcrypt.hash('123456', 10)
const user1 = await prisma.user.create({
@@ -1429,12 +1441,16 @@ async function main() {
console.log('数据库初始化完成!')
console.log('========================================')
console.log('\n测试账号信息:')
console.log('1. 王先生')
console.log('1. 管理员')
console.log(' 邮箱: freedak@163.com')
console.log(' 密码: why701208')
console.log(' 角色: 管理员')
console.log('\n2. 王先生')
console.log(' 邮箱: wang@example.com')
console.log(' 密码: 123456')
console.log(' 家族树: 王氏家族 (5代32人)')
console.log(' 迁徙城市: 济南→北京、上海、深圳、杭州、成都、苏州、西安')
console.log('\n2. 虞女士')
console.log('\n3. 虞女士')
console.log(' 邮箱: yu@example.com')
console.log(' 密码: 123456')
console.log(' 家族树: 虞氏家族 (5代33人)')