feat: implement financial recurrence, privacy settings, and premium DateTimePicker overhaul

This commit is contained in:
Erik Silva
2026-01-25 20:17:36 -03:00
parent 416bd83ea7
commit e4935941fc
43 changed files with 3238 additions and 765 deletions

View File

@@ -19,7 +19,7 @@ async function main() {
})
// 2. Criar Pelada de Exemplo
await prisma.group.upsert({
const group = await prisma.group.upsert({
where: { email: 'erik@idealpages.com.br' },
update: {},
create: {
@@ -34,6 +34,55 @@ async function main() {
}
})
// 3. Criar Jogador Líder (Rei)
await prisma.player.upsert({
where: { number_groupId: { number: 10, groupId: group.id } },
update: {},
create: {
name: 'Erik Ideal',
number: 10,
position: 'MEI',
level: 5,
// @ts-ignore
isLeader: true,
groupId: group.id
}
})
// 4. Adicionar alguns jogadores para teste
const players = [
{ name: 'Ricardo Rocha', number: 4, position: 'ZAG', level: 4 },
{ name: 'Bebeto', number: 7, position: 'ATA', level: 5 },
{ name: 'Dunga', number: 8, position: 'VOL', level: 4 },
{ name: 'Taffarel', number: 1, position: 'GOL', level: 5 },
]
for (const p of players) {
await prisma.player.upsert({
where: { number_groupId: { number: p.number, groupId: group.id } },
update: {},
create: {
...p,
groupId: group.id
}
})
}
// 5. Criar uma partida agendada
const nextWednesday = new Date()
nextWednesday.setDate(nextWednesday.getDate() + ((7 - nextWednesday.getDay() + 3) % 7 || 7))
nextWednesday.setHours(20, 0, 0, 0)
await prisma.match.create({
data: {
groupId: group.id,
date: nextWednesday,
location: 'Arena Central',
maxPlayers: 20,
status: 'SCHEDULED'
}
})
console.log('Seed concluído com sucesso!')
}