using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Rainbow.Models
{
    public enum CustomerType
    {
        Unspecified = 0,
        EndCustomer = 1,
        Reseller = 2
    }

    public class Customer : IAuditInfo
    {
        public Customer()
        {
            Projects = new List<Project>();
            Domains = new List<Domain>();
            HostingAccounts = new List<HostingAccount>();
            Servers = new List<Server>();
        }

        [Key]
        public int Id { get; set; }

        [Required, Display(Name = "Typ")]
        public CustomerType Type { get; set; }

        [Required, Display(Name = "Kdnr.")]
        public string Number { get; set; }

        [Required]
        public string DirectoryName { get; set; }

        [Required, Display(Name = "Firma")]
        public string CompanyName { get; set; }

        [Display(Name = "Strasse")]
        public string StreetAddress { get; set; }

        [Display(Name = "PLZ")]
        public string Zip { get; set; }

        [Display(Name = "Ort")]
        public string City { get; set; }

        [Display(Name = "Land")]
        public string Country { get; set; }

        [Display(Name = "Telefon")]
        public string Phone { get; set; }

        [Display(Name = "Fax")]
        public string Fax { get; set; }

        [Display(Name = "E-Mail")]
        public string Email { get; set; }

        [Display(Name = "WWW")]
        public string Www { get; set; }

        [Display(Name="Vorausbezahlte Stunden")]
        public double PrepaidHours { get; set; }

        [Required, Display(Name = "Erstellt")]
        public DateTime Created { get; set; }

        [Display(Name = "Erstellt von")]
        public string CreatedBy { get; set; }

        [Required, Display(Name = "Geändert")]
        public DateTime LastModified { get; set; }

        [Display(Name = "Geändert von")]
        public string LastModifiedBy { get; set; }

        public virtual ICollection<Project> Projects { get; set; }

        public virtual ICollection<Domain> Domains { get; set; }

        public virtual ICollection<HostingAccount> HostingAccounts { get; set; }

        public virtual ICollection<Server> Servers { get; set; }
    }
}