254 lines
8.0 KiB
TypeScript
254 lines
8.0 KiB
TypeScript
// lib/mock-data.ts
|
||
// TODO: substituir por queries Prisma quando DATABASE_URL estiver configurada
|
||
|
||
export interface Animal {
|
||
id: string;
|
||
name: string;
|
||
species: 'DOG' | 'CAT' | 'OTHER';
|
||
breed: string;
|
||
ageMonths: number;
|
||
sex: 'MALE' | 'FEMALE';
|
||
sterilized: boolean;
|
||
status: 'AVAILABLE' | 'RESERVED' | 'ADOPTED';
|
||
urgent: boolean;
|
||
description: string;
|
||
photos: string[];
|
||
shelter: {
|
||
id: string;
|
||
name: string;
|
||
district: string;
|
||
address: string;
|
||
phone: string;
|
||
email: string;
|
||
openHours: string;
|
||
};
|
||
}
|
||
|
||
export const MOCK_ANIMALS: Animal[] = [
|
||
{
|
||
id: 'mock-1',
|
||
name: 'Bobi',
|
||
species: 'DOG',
|
||
breed: 'Labrador',
|
||
ageMonths: 24,
|
||
sex: 'MALE',
|
||
sterilized: true,
|
||
status: 'AVAILABLE',
|
||
urgent: false,
|
||
description:
|
||
'O Bobi é um Labrador cheio de energia e amor para dar. Adora brincar ao ar livre e é excelente com crianças. Está vacinado, desparasitado e pronto para encontrar a sua família definitiva. Vive em canil há 8 meses e merece uma segunda oportunidade.',
|
||
photos: [
|
||
'https://images.unsplash.com/photo-1587300003388-59208cc962cb?w=600&q=80',
|
||
'https://images.unsplash.com/photo-1552053831-71594a27632d?w=600&q=80',
|
||
'https://images.unsplash.com/photo-1560807707-8cc77767d783?w=600&q=80',
|
||
],
|
||
shelter: {
|
||
id: 'shelter-1',
|
||
name: 'Canil Municipal de Lisboa',
|
||
district: 'Lisboa',
|
||
address: 'Rua do Canil, 12, 1500-001 Lisboa',
|
||
phone: '213 000 001',
|
||
email: 'canil@cm-lisboa.pt',
|
||
openHours: 'Seg–Sex 9h–18h · Sáb 10h–14h',
|
||
},
|
||
},
|
||
{
|
||
id: 'mock-2',
|
||
name: 'Luna',
|
||
species: 'CAT',
|
||
breed: 'Siamês',
|
||
ageMonths: 18,
|
||
sex: 'FEMALE',
|
||
sterilized: true,
|
||
status: 'AVAILABLE',
|
||
urgent: true,
|
||
description:
|
||
'A Luna é uma gata Siamesa elegante e carinhosa. Adora colo e ronrona constantemente. É ideal para apartamento e dá-se bem com outros gatos. Urgente — o canil está sobrelotado e ela precisa de lar.',
|
||
photos: [
|
||
'https://images.unsplash.com/photo-1514888286974-6c03e2ca1dba?w=600&q=80',
|
||
'https://images.unsplash.com/photo-1573865526739-10659fec78a5?w=600&q=80',
|
||
],
|
||
shelter: {
|
||
id: 'shelter-2',
|
||
name: 'Associação Amigos dos Animais do Porto',
|
||
district: 'Porto',
|
||
address: 'Av. da Boavista, 450, 4100-100 Porto',
|
||
phone: '222 000 002',
|
||
email: 'adopcao@amigosanimais.pt',
|
||
openHours: 'Seg–Dom 10h–17h',
|
||
},
|
||
},
|
||
{
|
||
id: 'mock-3',
|
||
name: 'Rex',
|
||
species: 'DOG',
|
||
breed: 'Pastor Alemão',
|
||
ageMonths: 36,
|
||
sex: 'MALE',
|
||
sterilized: false,
|
||
status: 'AVAILABLE',
|
||
urgent: false,
|
||
description:
|
||
'O Rex é um Pastor Alemão inteligente e leal. Tem treino básico de obediência e adora aprender novos comandos. Precisa de espaço exterior e de uma pessoa experiente com a raça.',
|
||
photos: [
|
||
'https://images.unsplash.com/photo-1589941013453-ec89f33b5e95?w=600&q=80',
|
||
'https://images.unsplash.com/photo-1605568427561-40dd23c2acea?w=600&q=80',
|
||
],
|
||
shelter: {
|
||
id: 'shelter-3',
|
||
name: 'Centro de Recolha de Sintra',
|
||
district: 'Sintra',
|
||
address: 'Estrada da Serra, 8, 2710-001 Sintra',
|
||
phone: '219 000 003',
|
||
email: 'sintra@recolha.pt',
|
||
openHours: 'Ter–Sáb 9h–17h',
|
||
},
|
||
},
|
||
{
|
||
id: 'mock-4',
|
||
name: 'Mel',
|
||
species: 'CAT',
|
||
breed: 'Europeu Comum',
|
||
ageMonths: 8,
|
||
sex: 'FEMALE',
|
||
sterilized: true,
|
||
status: 'AVAILABLE',
|
||
urgent: true,
|
||
description:
|
||
'A Mel é uma gatinha de 8 meses cheia de curiosidade e energia. Brinca o dia todo e adormece no colo à noite. Socializada com crianças e outros animais.',
|
||
photos: [
|
||
'https://images.unsplash.com/photo-1533743983669-94fa5c4338ec?w=600&q=80',
|
||
'https://images.unsplash.com/photo-1495360010541-f48722b4f3c7?w=600&q=80',
|
||
],
|
||
shelter: {
|
||
id: 'shelter-1',
|
||
name: 'Canil Municipal de Lisboa',
|
||
district: 'Lisboa',
|
||
address: 'Rua do Canil, 12, 1500-001 Lisboa',
|
||
phone: '213 000 001',
|
||
email: 'canil@cm-lisboa.pt',
|
||
openHours: 'Seg–Sex 9h–18h · Sáb 10h–14h',
|
||
},
|
||
},
|
||
{
|
||
id: 'mock-5',
|
||
name: 'Toto',
|
||
species: 'DOG',
|
||
breed: 'Beagle',
|
||
ageMonths: 12,
|
||
sex: 'MALE',
|
||
sterilized: true,
|
||
status: 'AVAILABLE',
|
||
urgent: false,
|
||
description:
|
||
'O Toto é um Beagle jovem, curioso e muito sociável. Adora farejar tudo e brincar com outros cães. Excelente companheiro para famílias activas.',
|
||
photos: [
|
||
'https://images.unsplash.com/photo-1505628346881-b72b27e84530?w=600&q=80',
|
||
'https://images.unsplash.com/photo-1537151608828-ea2b11777ee8?w=600&q=80',
|
||
],
|
||
shelter: {
|
||
id: 'shelter-4',
|
||
name: 'Associação Zara Animal',
|
||
district: 'Braga',
|
||
address: 'Rua das Flores, 22, 4700-001 Braga',
|
||
phone: '253 000 004',
|
||
email: 'zara@zaraaanimal.pt',
|
||
openHours: 'Seg–Sex 10h–18h',
|
||
},
|
||
},
|
||
{
|
||
id: 'mock-6',
|
||
name: 'Nala',
|
||
species: 'DOG',
|
||
breed: 'Golden Retriever',
|
||
ageMonths: 60,
|
||
sex: 'FEMALE',
|
||
sterilized: true,
|
||
status: 'AVAILABLE',
|
||
urgent: false,
|
||
description:
|
||
'A Nala é uma Golden Retriever de 5 anos, calma, carinhosa e treinada. Adora crianças e adapta-se facilmente a qualquer ambiente. Adoptada e devolvida por motivos de saúde do dono anterior — não tem qualquer problema.',
|
||
photos: [
|
||
'https://images.unsplash.com/photo-1601758125946-6ec2ef64daf8?w=600&q=80',
|
||
'https://images.unsplash.com/photo-1516734212186-a967f81ad0d7?w=600&q=80',
|
||
],
|
||
shelter: {
|
||
id: 'shelter-2',
|
||
name: 'Associação Amigos dos Animais do Porto',
|
||
district: 'Porto',
|
||
address: 'Av. da Boavista, 450, 4100-100 Porto',
|
||
phone: '222 000 002',
|
||
email: 'adopcao@amigosanimais.pt',
|
||
openHours: 'Seg–Dom 10h–17h',
|
||
},
|
||
},
|
||
{
|
||
id: 'mock-7',
|
||
name: 'Simba',
|
||
species: 'CAT',
|
||
breed: 'Maine Coon',
|
||
ageMonths: 30,
|
||
sex: 'MALE',
|
||
sterilized: true,
|
||
status: 'AVAILABLE',
|
||
urgent: false,
|
||
description:
|
||
'O Simba é um Maine Coon imponente e gentil. Tem um pelo magnífico e um temperamento sereno. Ideal para quem procura um gato tranquilo e sociável.',
|
||
photos: [
|
||
'https://images.unsplash.com/photo-1574158622682-e40e69881006?w=600&q=80',
|
||
'https://images.unsplash.com/photo-1533738363-b7f9aef128ce?w=600&q=80',
|
||
],
|
||
shelter: {
|
||
id: 'shelter-3',
|
||
name: 'Centro de Recolha de Sintra',
|
||
district: 'Sintra',
|
||
address: 'Estrada da Serra, 8, 2710-001 Sintra',
|
||
phone: '219 000 003',
|
||
email: 'sintra@recolha.pt',
|
||
openHours: 'Ter–Sáb 9h–17h',
|
||
},
|
||
},
|
||
{
|
||
id: 'mock-8',
|
||
name: 'Bica',
|
||
species: 'DOG',
|
||
breed: 'Rafeiro Alentejano',
|
||
ageMonths: 48,
|
||
sex: 'FEMALE',
|
||
sterilized: true,
|
||
status: 'AVAILABLE',
|
||
urgent: true,
|
||
description:
|
||
'A Bica é uma Rafeira Alentejana de 4 anos, leal e protectora. Cresceu na rua mas já está completamente socializada. Precisa de espaço exterior e de uma pessoa paciente.',
|
||
photos: [
|
||
'https://images.unsplash.com/photo-1583337130417-3346a1be7dee?w=600&q=80',
|
||
'https://images.unsplash.com/photo-1548199973-03cce0bbc87b?w=600&q=80',
|
||
],
|
||
shelter: {
|
||
id: 'shelter-4',
|
||
name: 'Associação Zara Animal',
|
||
district: 'Braga',
|
||
address: 'Rua das Flores, 22, 4700-001 Braga',
|
||
phone: '253 000 004',
|
||
email: 'zara@zaraaanimal.pt',
|
||
openHours: 'Seg–Sex 10h–18h',
|
||
},
|
||
},
|
||
];
|
||
|
||
export function formatAge(months: number): string {
|
||
if (months < 12) return `${months} ${months === 1 ? 'mês' : 'meses'}`;
|
||
const years = Math.floor(months / 12);
|
||
const rem = months % 12;
|
||
if (rem === 0) return `${years} ${years === 1 ? 'ano' : 'anos'}`;
|
||
return `${years} ${years === 1 ? 'ano' : 'anos'} e ${rem} ${rem === 1 ? 'mês' : 'meses'}`;
|
||
}
|
||
|
||
export function formatSex(sex: 'MALE' | 'FEMALE'): string {
|
||
return sex === 'MALE' ? '♂ Macho' : '♀ Fêmea';
|
||
}
|
||
|
||
export function formatSpecies(species: 'DOG' | 'CAT' | 'OTHER'): string {
|
||
return species === 'DOG' ? 'Cão' : species === 'CAT' ? 'Gato' : 'Outro';
|
||
}
|