Item add
This commit is contained in:
293
lib/constants/item_categories.dart
Normal file
293
lib/constants/item_categories.dart
Normal file
@@ -0,0 +1,293 @@
|
||||
class ItemCategory {
|
||||
final String id;
|
||||
final String name;
|
||||
final String icon;
|
||||
final String description;
|
||||
final List<Subcategory> subcategories;
|
||||
|
||||
ItemCategory({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.icon,
|
||||
required this.description,
|
||||
required this.subcategories,
|
||||
});
|
||||
}
|
||||
|
||||
class Subcategory {
|
||||
final String id;
|
||||
final String name;
|
||||
final String examples;
|
||||
|
||||
Subcategory({required this.id, required this.name, required this.examples});
|
||||
}
|
||||
|
||||
class ContextTag {
|
||||
final String id;
|
||||
final String name;
|
||||
final String description;
|
||||
final String examples;
|
||||
|
||||
ContextTag({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.description,
|
||||
required this.examples,
|
||||
});
|
||||
}
|
||||
|
||||
// Categorias principais
|
||||
final List<ItemCategory> ITEM_CATEGORIES = [
|
||||
ItemCategory(
|
||||
id: 'clothing',
|
||||
name: 'Roupa',
|
||||
icon: '👕',
|
||||
description: 'Peças de vestuário',
|
||||
subcategories: [
|
||||
Subcategory(
|
||||
id: 'casual',
|
||||
name: 'Casual',
|
||||
examples: 't-shirts, calças de ganga, hoodies',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'formal',
|
||||
name: 'Formal',
|
||||
examples: 'fatos, camisas, vestidos de cerimónia',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'sportswear',
|
||||
name: 'Sportswear',
|
||||
examples: 'leggings, tops de treino, shorts',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'outerwear',
|
||||
name: 'Outerwear',
|
||||
examples: 'casacos, impermeáveis, parkas',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'underwear',
|
||||
name: 'Underwear',
|
||||
examples: 'roupa interior, meias',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'sleepwear',
|
||||
name: 'Sleepwear',
|
||||
examples: 'pijamas, roupões',
|
||||
),
|
||||
],
|
||||
),
|
||||
ItemCategory(
|
||||
id: 'electronics',
|
||||
name: 'Eletrónica',
|
||||
icon: '💻',
|
||||
description: 'Dispositivos e acessórios tecnológicos',
|
||||
subcategories: [
|
||||
Subcategory(
|
||||
id: 'computers',
|
||||
name: 'Computers',
|
||||
examples: 'portáteis, tablets',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'phones',
|
||||
name: 'Phones',
|
||||
examples: 'smartphones, earphones',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'cameras',
|
||||
name: 'Cameras',
|
||||
examples: 'máquinas fotográficas, action cams',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'cables',
|
||||
name: 'Cables',
|
||||
examples: 'carregadores, cabos USB, adaptadores',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'gaming',
|
||||
name: 'Gaming',
|
||||
examples: 'consolas, comandos, jogos',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'audio',
|
||||
name: 'Audio',
|
||||
examples: 'headphones, colunas bluetooth',
|
||||
),
|
||||
],
|
||||
),
|
||||
ItemCategory(
|
||||
id: 'footwear',
|
||||
name: 'Calçado',
|
||||
icon: '👟',
|
||||
description: 'Sapatos, botas, sandálias',
|
||||
subcategories: [
|
||||
Subcategory(
|
||||
id: 'casual',
|
||||
name: 'Casual',
|
||||
examples: 'sapatilhas, loafers',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'formal',
|
||||
name: 'Formal',
|
||||
examples: 'sapatos de salto, mocassins',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'sport',
|
||||
name: 'Sport',
|
||||
examples: 'ténis de corrida, chuteiras',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'outdoor',
|
||||
name: 'Outdoor',
|
||||
examples: 'botas de caminhada, sandálias',
|
||||
),
|
||||
],
|
||||
),
|
||||
ItemCategory(
|
||||
id: 'accessories',
|
||||
name: 'Acessórios',
|
||||
icon: '🎒',
|
||||
description: 'Bolsas, relógios, óculos, bijuteria',
|
||||
subcategories: [
|
||||
Subcategory(
|
||||
id: 'bags',
|
||||
name: 'Bags',
|
||||
examples: 'mochilas, malas, bolsas',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'watches',
|
||||
name: 'Watches',
|
||||
examples: 'relógios analógicos e digitais',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'eyewear',
|
||||
name: 'Eyewear',
|
||||
examples: 'óculos de sol, óculos de grau',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'jewelry',
|
||||
name: 'Jewelry',
|
||||
examples: 'colares, pulseiras, brincos',
|
||||
),
|
||||
Subcategory(id: 'hats', name: 'Hats', examples: 'bonés, chapéus, gorros'),
|
||||
Subcategory(id: 'belts', name: 'Belts', examples: 'cintos'),
|
||||
],
|
||||
),
|
||||
ItemCategory(
|
||||
id: 'documents',
|
||||
name: 'Documentos',
|
||||
icon: '📄',
|
||||
description: 'Passaporte, cartões, papéis importantes',
|
||||
subcategories: [
|
||||
Subcategory(
|
||||
id: 'identity',
|
||||
name: 'Identity',
|
||||
examples: 'passaporte, BI, carta de condução',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'health',
|
||||
name: 'Health',
|
||||
examples: 'cartão de saúde, receitas',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'travel',
|
||||
name: 'Travel',
|
||||
examples: 'bilhetes, reservas, seguros',
|
||||
),
|
||||
Subcategory(
|
||||
id: 'financial',
|
||||
name: 'Financial',
|
||||
examples: 'cartões de crédito/débito',
|
||||
),
|
||||
],
|
||||
),
|
||||
ItemCategory(
|
||||
id: 'other',
|
||||
name: 'Outros',
|
||||
icon: '📦',
|
||||
description: 'Tudo o resto',
|
||||
subcategories: [],
|
||||
),
|
||||
];
|
||||
|
||||
// Tags de contexto
|
||||
final List<ContextTag> CONTEXT_TAGS = [
|
||||
ContextTag(
|
||||
id: 'travel',
|
||||
name: 'Viagem',
|
||||
description: 'Qualquer tipo de viagem',
|
||||
examples: 'Mala, passaporte, adaptador de tomadas',
|
||||
),
|
||||
ContextTag(
|
||||
id: 'work',
|
||||
name: 'Trabalho',
|
||||
description: 'Ambiente de trabalho',
|
||||
examples: 'Portátil, fato, sapatos formais',
|
||||
),
|
||||
ContextTag(
|
||||
id: 'casual',
|
||||
name: 'Casual',
|
||||
description: 'Dia-a-dia informal',
|
||||
examples: 'Jeans, t-shirt, sapatilhas',
|
||||
),
|
||||
ContextTag(
|
||||
id: 'sport',
|
||||
name: 'Desporto',
|
||||
description: 'Atividade física',
|
||||
examples: 'Leggings, ténis de corrida, garrafa de água',
|
||||
),
|
||||
ContextTag(
|
||||
id: 'formal',
|
||||
name: 'Formal',
|
||||
description: 'Eventos formais',
|
||||
examples: 'Fato, vestido, sapatos de salto',
|
||||
),
|
||||
ContextTag(
|
||||
id: 'outdoor',
|
||||
name: 'Exterior',
|
||||
description: 'Exterior e natureza',
|
||||
examples: 'Blusão, botas, impermeável',
|
||||
),
|
||||
ContextTag(
|
||||
id: 'beach',
|
||||
name: 'Praia',
|
||||
description: 'Praia ou piscina',
|
||||
examples: 'Biquíni, chinelos, protetor solar',
|
||||
),
|
||||
ContextTag(
|
||||
id: 'cold',
|
||||
name: 'Frio',
|
||||
description: 'Clima frio',
|
||||
examples: 'Casaco, cachecol, luvas',
|
||||
),
|
||||
ContextTag(
|
||||
id: 'hot',
|
||||
name: 'Quente',
|
||||
description: 'Clima quente',
|
||||
examples: 'Roupa leve, t-shirts, sandálias',
|
||||
),
|
||||
];
|
||||
|
||||
// Regras de atribuição automática de tags
|
||||
List<String> getAutoContextTags(String categoryId, String subcategoryId) {
|
||||
final key = '$categoryId.$subcategoryId';
|
||||
|
||||
final Map<String, List<String>> autoTags = {
|
||||
'clothing.formal': ['work', 'formal'],
|
||||
'clothing.casual': ['casual', 'travel'],
|
||||
'clothing.sportswear': ['sport'],
|
||||
'clothing.outerwear': ['travel', 'cold', 'outdoor'],
|
||||
'electronics.computers': ['work', 'travel'],
|
||||
'electronics.phones': ['travel', 'work', 'casual'],
|
||||
'electronics.cables': ['travel'],
|
||||
'electronics.gaming': ['casual', 'travel'],
|
||||
'footwear.formal': ['work', 'formal'],
|
||||
'footwear.casual': ['casual', 'travel'],
|
||||
'footwear.sport': ['sport'],
|
||||
'footwear.outdoor': ['outdoor', 'travel'],
|
||||
'accessories.bags': ['travel', 'work', 'casual'],
|
||||
'documents.identity': ['travel'],
|
||||
'documents.travel': ['travel'],
|
||||
};
|
||||
|
||||
return autoTags[key] ?? [];
|
||||
}
|
||||
Reference in New Issue
Block a user