using System;
using Swarmops.Basic.Interfaces;
namespace Swarmops.Basic.Types
{
public class BasicPayrollItem : IHasIdentity
{
public BasicPayrollItem (int payrollItemId, int personId, int organizationId, int countryId,
DateTime employedDate,
int reportsToPersonId, Int64 baseSalaryCents, int budgetId, bool open, DateTime terminatedDate,
int subtractiveTaxLevelId, double additiveTaxLevel)
{
PayrollItemId = payrollItemId;
PersonId = personId;
OrganizationId = organizationId;
CountryId = countryId;
EmployedDate = employedDate;
ReportsToPersonId = reportsToPersonId;
BaseSalaryCents = baseSalaryCents;
BudgetId = budgetId;
Open = open;
TerminatedDate = terminatedDate;
SubtractiveTaxLevelId = subtractiveTaxLevelId;
AdditiveTaxLevel = additiveTaxLevel;
}
public BasicPayrollItem (BasicPayrollItem original)
: this (original.PayrollItemId, original.PersonId, original.OrganizationId, original.CountryId,
original.EmployedDate, original.ReportsToPersonId, original.BaseSalaryCents, original.BudgetId,
original.Open, original.TerminatedDate, original.SubtractiveTaxLevelId, original.AdditiveTaxLevel)
{
// empty copy constructor
}
///
/// Gets the identity of the payroll item. Also accessible through Identity.
///
public int PayrollItemId { get; private set; }
///
/// The employed person Id.
///
public int PersonId { get; private set; }
///
/// The employing organization.
///
public int OrganizationId { get; private set; }
///
/// The employment country (for tax laws and such).
///
public int CountryId { get; private set; }
///
/// The date of employment.
///
public DateTime EmployedDate { get; private set; }
///
/// The person above this person in the org chart.
///
public int ReportsToPersonId { get; protected set; }
///
/// The base gross montly salary in the local currency.
///
public Int64 BaseSalaryCents { get; protected set; }
///
/// The budget charged with the costs of this employment.
///
public int BudgetId { get; protected set; }
///
/// True if this employment is still active.
///
public bool Open { get; protected set; }
///
/// If closed, this field contains the date the employment ended.
///
public DateTime TerminatedDate { get; protected set; }
///
/// The tax level code of the country of employment. Subtracted from gross salary to get net salary.
///
public int SubtractiveTaxLevelId { get; protected set; }
///
/// The tax level, as a fraction, paid by the organization on top of the gross salary.
///
public double AdditiveTaxLevel { get; protected set; }
#region IHasIdentity Members
public int Identity
{
get { return PayrollItemId; }
}
#endregion
}
}