Initial commit - app-padrao-1.0

This commit is contained in:
Erik Silva
2025-12-19 23:29:24 -03:00
commit ec76d3d633
205 changed files with 13131 additions and 0 deletions

View File

@@ -0,0 +1,69 @@
import 'package:hive/hive.dart';
part 'haircut_model.g.dart';
@HiveType(typeId: 1)
class HaircutModel extends HiveObject {
@HiveField(0)
final String id;
@HiveField(1)
final String userId;
@HiveField(2)
final String clientName;
@HiveField(3)
final String serviceType;
@HiveField(4)
final double price;
@HiveField(5)
final DateTime dateTime;
@HiveField(6)
final String? notes;
@HiveField(7)
final String? transactionId; // Link com a transação financeira
@HiveField(8, defaultValue: 'Dinheiro')
final String paymentMethod;
HaircutModel({
required this.id,
required this.userId,
required this.clientName,
required this.serviceType,
required this.price,
required this.dateTime,
this.notes,
this.transactionId,
this.paymentMethod = 'Dinheiro',
});
HaircutModel copyWith({
String? id,
String? userId,
String? clientName,
String? serviceType,
double? price,
DateTime? dateTime,
String? notes,
String? transactionId,
String? paymentMethod,
}) {
return HaircutModel(
id: id ?? this.id,
userId: userId ?? this.userId,
clientName: clientName ?? this.clientName,
serviceType: serviceType ?? this.serviceType,
price: price ?? this.price,
dateTime: dateTime ?? this.dateTime,
notes: notes ?? this.notes,
transactionId: transactionId ?? this.transactionId,
paymentMethod: paymentMethod ?? this.paymentMethod,
);
}
}