part of '../user.dart';

@freezed
class User with _$User {
  const User._();

  const factory User({
    required String id,
    required String organizationId,
    required String outletId,
    required String name,
    required String email,
    required String role,
    required Map<String, dynamic> permissions,
    required bool isActive,
    required DateTime createdAt,
    required DateTime updatedAt,
  }) = _User;

  factory User.empty() => User(
    id: '',
    organizationId: '',
    outletId: '',
    name: '',
    email: '',
    role: '',
    permissions: {},
    isActive: false,
    createdAt: DateTime.now(),
    updatedAt: DateTime.now(),
  );
}
