import 'package:fcs/domain/entities/discount.dart';
import 'package:fcs/pages/main/model/base_model.dart';

class DiscountModel extends BaseModel {
  List<Discount> get discounts {
    List<Discount> discountList = [
      Discount(
        code: 'XMQY01',
        customer: 'Ko Nyi',
        amount: 5000,
        status: 'Used',
      ),
      Discount(
        code: 'XMQY02',
        customer: 'Ko Aung Myo',
        amount: 3000,
        status: 'Avaliable',
      ),
      Discount(
        code: 'XMQY03',
        customer: 'Ko Zaw Thu',
        amount: 2000,
        status: 'Used',
      ),
      Discount(
        code: 'XMQY04',
        customer: 'Ko Myo Min',
        amount: 3000,
        status: 'Avaliable',
      ),
      Discount(
        code: 'XMQY05',
        customer: 'Ko Nyi',
        amount: 3000,
        status: 'Avaliable',
      ),
    ];
    return discountList;
  }

  // List<Discount> get discountByCustomer {
  //   return invoices.where((e) => e.status == "Avaliable").toList()
  //     ..sort((e1, e2) {
  //       return e2.invoiceNumber.compareTo(e1.invoiceNumber);
  //     });
  // }

  void initUser(user) {
    super.initUser(user);
  }

  @override
  logout() async {
    // discounts = [];
  }
}
