import 'package:app_hit_a_wod/src/models/box_order.model.dart';
import 'package:app_hit_a_wod/src/models/company.model.dart';
import 'package:app_hit_a_wod/src/models/pricing.model.dart';
import 'package:app_hit_a_wod/src/models/role.model.dart';
import 'package:app_hit_a_wod/src/models/user.model.dart';
import 'package:json_annotation/json_annotation.dart';

part 'user_subscription.model.g.dart';

@JsonSerializable()
class UserSubscription {

  UserSubscription();

  factory UserSubscription.fromJson(Map<String, dynamic> json) => _$UserSubscriptionFromJson(json);
  Map<String, dynamic> toJson() => _$UserSubscriptionToJson(this);

  int id;
  int pricing_id;
  int user_id;
  int role_id;
  DateTime start_date;
  DateTime end_date;
  double price;
  int wod_counter;
  int open_counter;
  int total_counter;
  String stripe_id;
  bool renew;
  DateTime created_at;
  DateTime updated_at;
  int active;
  int company_id;
  List<int> box_ids;
  Pricing pricing;
  Role role;
  Company company;
  User user;
  List<BoxOrder> box_orders;
  DateTime ends_at;
}