first commit
This commit is contained in:
10
Complex.Domain/Entities/BasicTable.cs
Normal file
10
Complex.Domain/Entities/BasicTable.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Complex.Domain.Commons;
|
||||
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
public class BasicTable: BaseEntity
|
||||
{
|
||||
//public int Id { set; get; }
|
||||
public string Title { set; get; }
|
||||
}
|
||||
}
|
||||
37
Complex.Domain/Entities/ChargeCycle.cs
Normal file
37
Complex.Domain/Entities/ChargeCycle.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using Complex.Domain.Commons;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// مدیریت شارژ
|
||||
/// </summary>
|
||||
[Auditable]//UnitCharge
|
||||
public class CostCycle:BaseEntity<Guid>
|
||||
{
|
||||
public Guid ComplexId { set; get; }
|
||||
public virtual ComplexEntity Complex { set; get; }
|
||||
public string Title { set; get; }
|
||||
public DateOnly StartDate { set; get; }
|
||||
public DateOnly EndDate { set; get; }
|
||||
public long Amount { set; get; } = 0;
|
||||
/// <summary>
|
||||
/// روز از ماه برای تشویقی
|
||||
/// </summary>
|
||||
public int EncouragementDay { set; get; } = 0;
|
||||
/// <summary>
|
||||
/// مبلغ اجاره با احتساب تشویقی
|
||||
/// </summary>
|
||||
public long EncouragementAmount { set; get; } = 0;
|
||||
/// <summary>
|
||||
/// اگر برای واحدهای خاصی بود
|
||||
/// </summary>
|
||||
//public virtual List<UnitChargeCycle>? UnitChargeCycles { set; get; }
|
||||
public virtual ICollection<Unit> Units { set; get; }
|
||||
/// <summary>
|
||||
/// null یعنی شارژ
|
||||
/// </summary>
|
||||
public int? IncomeCostTitleId { set; get; }
|
||||
public virtual IncomeCostTitle? IncomeCostTitle { set; get; }
|
||||
}
|
||||
}
|
||||
12
Complex.Domain/Entities/Chat.cs
Normal file
12
Complex.Domain/Entities/Chat.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using Complex.Domain.Commons;
|
||||
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
public class Chat:BaseEntity<long>
|
||||
{
|
||||
public Guid ComplexId { set; get; }
|
||||
public string PersonMobileNumber { set; get; }
|
||||
public string Body { set; get; }
|
||||
public byte ChatTypeId { set; get; }
|
||||
}
|
||||
}
|
||||
19
Complex.Domain/Entities/City.cs
Normal file
19
Complex.Domain/Entities/City.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
public partial class City
|
||||
{
|
||||
public City()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public int CityId { get; set; }
|
||||
public int? ProvinceId { get; set; }
|
||||
public string? CityTitle { get; set; }
|
||||
|
||||
public virtual Province? Province { get; set; }
|
||||
}
|
||||
}
|
||||
43
Complex.Domain/Entities/ComplexEntity.cs
Normal file
43
Complex.Domain/Entities/ComplexEntity.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using Complex.Domain.Commons;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
[Auditable]
|
||||
public class ComplexEntity : BaseEntity<Guid>
|
||||
{
|
||||
public string Title { set; get; }
|
||||
public string? Address { set; get; }
|
||||
/// <summary>
|
||||
/// وضعیت
|
||||
/// </summary>
|
||||
public int? StateId { set; get; }
|
||||
/// <summary>
|
||||
/// متراژ کل
|
||||
/// </summary>
|
||||
public int? AreaMeter { set; get; }
|
||||
/// <summary>
|
||||
/// متراژ حیاط
|
||||
/// </summary>
|
||||
public int? YardMeter { set; get; }
|
||||
/// <summary>
|
||||
/// تعداد آسانسور
|
||||
/// </summary>
|
||||
public int? ElevatorCount { set; get; }
|
||||
/// <summary> تعداد انباری</summary>
|
||||
public int? WarehouseCount { set; get; }
|
||||
public int? YearMake { set; get; }
|
||||
public Guid? ParentId { set; get; }
|
||||
public ComplexEntity? Parent { set; get; }
|
||||
public string? Description { set; get; }
|
||||
public int CityId { set; get; }
|
||||
public virtual City City { set; get; }
|
||||
public virtual Collection<ComplexManager> ComplexManagers { set; get; }
|
||||
public virtual ICollection<Unit> Units { set; get; }
|
||||
}
|
||||
}
|
||||
22
Complex.Domain/Entities/ComplexManager.cs
Normal file
22
Complex.Domain/Entities/ComplexManager.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using Complex.Domain.Commons;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
[Auditable]
|
||||
public class ComplexManager
|
||||
{
|
||||
public int Id { set; get; }
|
||||
public Guid ComplexId { set; get; }
|
||||
public virtual ComplexEntity Complex { set; get; }
|
||||
public string? ManagerMobileNumberId { set; get; }
|
||||
public Person? ManagerMobileNumber { set; get; }
|
||||
public string StartDate { set; get; }
|
||||
public string EndDate { set; get; }
|
||||
}
|
||||
}
|
||||
28
Complex.Domain/Entities/ComplexUnitEvent.cs
Normal file
28
Complex.Domain/Entities/ComplexUnitEvent.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using Complex.Domain.Commons;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
[Auditable]
|
||||
public class ComplexUnitEvent : BaseEntity<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// اگر برای واحد بود
|
||||
/// </summary>
|
||||
public Guid? UnitId { set; get; }
|
||||
/// <summary>
|
||||
/// اگر برای مجتمع بود
|
||||
/// </summary>
|
||||
public int? ComplexId { set; get; }
|
||||
[MaxLength(10)]
|
||||
public string EventDate { set; get; }
|
||||
public string RegisterMobileNumber { set; get; }
|
||||
public string Body { set; get; }
|
||||
public string? Description { set; get; }
|
||||
}
|
||||
}
|
||||
32
Complex.Domain/Entities/Person.cs
Normal file
32
Complex.Domain/Entities/Person.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using Complex.Domain.Commons;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
[Auditable]
|
||||
public class Person : BaseEntity<string>
|
||||
{
|
||||
//[Key]
|
||||
//public string MobileNumber { set; get; }
|
||||
|
||||
public ICollection<UserToken> UserTokens { get; set; }
|
||||
public string? FirstName { get; set; }
|
||||
public string? LastName { get; set; }
|
||||
public byte? Gender { set;get; }
|
||||
//public int? MobileCode { set;get; }
|
||||
public byte[]? Avatar { set; get; }
|
||||
public bool IsActive { set; get; } = true;
|
||||
}
|
||||
public class ComplexPerson : BaseEntity<int>
|
||||
{
|
||||
public Guid ComplexId { set; get; }
|
||||
//public virtual ComplexEntity Complex { set; get; }
|
||||
public string? PersonMobileNumberId { set; get; }
|
||||
public Person? PersonMobileNumber { set; get; }
|
||||
}
|
||||
}
|
||||
11
Complex.Domain/Entities/Poster.cs
Normal file
11
Complex.Domain/Entities/Poster.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using Complex.Domain.Commons;
|
||||
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
public class Poster:BaseEntity<int>
|
||||
{
|
||||
public string RegisterMobileNumber { set; get; }
|
||||
public bool IsActive { set; get; } = false;
|
||||
public string ImagePath { set; get; }
|
||||
}
|
||||
}
|
||||
17
Complex.Domain/Entities/Province.cs
Normal file
17
Complex.Domain/Entities/Province.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
public partial class Province
|
||||
{
|
||||
public Province()
|
||||
{
|
||||
Cities = new HashSet<City>();
|
||||
}
|
||||
|
||||
public int ProvinceId { get; set; }
|
||||
public string? ProvinceTitle { get; set; }
|
||||
public virtual ICollection<City> Cities { get; set; }
|
||||
}
|
||||
}
|
||||
13
Complex.Domain/Entities/SmsCode.cs
Normal file
13
Complex.Domain/Entities/SmsCode.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Complex.Domain.Commons;
|
||||
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
public class SmsCode:BaseEntity
|
||||
{
|
||||
public string PhoneNumber { get; set; }
|
||||
public string Code { get; set; }
|
||||
public bool Used { get; set; }
|
||||
public int RequestCount { get; set; }
|
||||
public DateTime InsertDate { get; set; }
|
||||
}
|
||||
}
|
||||
41
Complex.Domain/Entities/Transaction.cs
Normal file
41
Complex.Domain/Entities/Transaction.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using Complex.Domain.Commons;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
[Auditable]
|
||||
public class Transaction : BaseEntity<long>
|
||||
{
|
||||
public int? TransactionTitleId { set; get; }
|
||||
public IncomeCostTitle? TransactionTitle { set; get; }
|
||||
[MaxLength(10)]
|
||||
public string TransactionPersianDate { set; get; }
|
||||
public DateTime TransactionDate { set; get; }
|
||||
public long Amount { set; get; } = 0;
|
||||
public string? Description { set; get; }
|
||||
public Guid? CostCycleId { set; get; }
|
||||
//افزونگی برای شارژ
|
||||
//public Guid ChargeTypeId { set; get; }
|
||||
/// <summary>
|
||||
/// null یعنی شارژ
|
||||
/// </summary>
|
||||
//public int? ChargeTypeId { set; get; }
|
||||
public virtual CostCycle? CostCycle { set; get; }
|
||||
public Guid? UnitId { set; get; }
|
||||
public virtual Unit? Unit { set; get; }
|
||||
//public string? TrackingCode { set; get; }
|
||||
//public long Remaining { set; get; } = 0;
|
||||
|
||||
/// <summary>
|
||||
///شماره فیش. اگر با فیش چیزی واریز شده است
|
||||
/// </summary>
|
||||
public string? FicheId { set; get; }
|
||||
|
||||
public Guid ComplexId { set; get; }
|
||||
public long UnitCostId { set; get; }
|
||||
public virtual UnitCost? UnitCost { set; get; }
|
||||
public string PersonId { set; get; }
|
||||
public Person Person { set; get; }
|
||||
}
|
||||
|
||||
}
|
||||
19
Complex.Domain/Entities/TransactionTitle.cs
Normal file
19
Complex.Domain/Entities/TransactionTitle.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using Complex.Domain.Commons;
|
||||
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
/// <summary>
|
||||
///عنوان درآمد و هزینه ها
|
||||
/// </summary>
|
||||
[Auditable]
|
||||
public class IncomeCostTitle :BaseEntity<int>
|
||||
{
|
||||
public string? Title { set; get; }
|
||||
public int TransactionTypeId { set; get; }
|
||||
public TransactionType TransactionType { set; get; }
|
||||
//public bool IsPublic { set; get; } = false;
|
||||
public Guid? ComplexId { set; get; }
|
||||
public virtual ComplexEntity? Complex { set; get; }
|
||||
public string? RegisterMobileNumber { set; get; }
|
||||
}
|
||||
}
|
||||
9
Complex.Domain/Entities/TransactionType.cs
Normal file
9
Complex.Domain/Entities/TransactionType.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// درآمد- مخارج
|
||||
/// </summary>
|
||||
public class TransactionType: BasicTable
|
||||
{
|
||||
}
|
||||
}
|
||||
52
Complex.Domain/Entities/Unit.cs
Normal file
52
Complex.Domain/Entities/Unit.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using Complex.Domain.Commons;
|
||||
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
[Auditable]
|
||||
public class Unit : BaseEntity<Guid>
|
||||
{
|
||||
public Guid ComplexId { set; get; }
|
||||
public string UnitName { set; get; }
|
||||
public virtual ComplexEntity Complex { set; get; }
|
||||
/// <summary>
|
||||
/// ساکن
|
||||
/// </summary>
|
||||
public string? OwnerId { set; get; }
|
||||
/// <summary>
|
||||
/// ساکن
|
||||
/// </summary>
|
||||
public virtual Person? Owner { set; get; }
|
||||
/// <summary>
|
||||
/// شماره مستاجر
|
||||
/// </summary>
|
||||
public string? TenantId { set; get; }
|
||||
/// <summary>
|
||||
/// مستاجر
|
||||
/// </summary>
|
||||
public virtual Person? Tenant { set; get; }
|
||||
public bool IsActive { set; get; }
|
||||
/// <summary>
|
||||
/// متراژ کل
|
||||
/// </summary>
|
||||
public int? AreaMeter { set; get; }
|
||||
/// <summary>
|
||||
/// بدهی از قبل
|
||||
/// </summary>
|
||||
//public int? RemainingAmount { set; get; }
|
||||
//public string? LastPaymentDate { set; get; }
|
||||
public string? EmergencyTels { set; get; }
|
||||
public int? ParkingAreaMeter { set; get; }
|
||||
/// <summary>
|
||||
/// متراژ حیاط
|
||||
/// </summary>
|
||||
public int? YardMeter { set; get; }
|
||||
public string? PublicState { set; get; }
|
||||
public int? StateId { set; get; }
|
||||
public virtual UnitState State { set; get; }
|
||||
public int? Floor { set; get; }
|
||||
//public string? UnitId { set; get; }
|
||||
public string? ManagerDescription { set; get; }
|
||||
public virtual ICollection<CostCycle> CostCycles { set; get; }
|
||||
|
||||
}
|
||||
}
|
||||
14
Complex.Domain/Entities/UnitAmountTrans.c--aaas
Normal file
14
Complex.Domain/Entities/UnitAmountTrans.c--aaas
Normal file
@@ -0,0 +1,14 @@
|
||||
//using Complex.Domain.Commons;
|
||||
//using System.ComponentModel.DataAnnotations;
|
||||
|
||||
//namespace Complex.Domain.Entities
|
||||
//{
|
||||
// [Auditable]
|
||||
// public class UnitTransAmount : BaseEntity<long>
|
||||
// {
|
||||
// public long Amount { set; get; } = 0;
|
||||
// public Guid? UnitId { set; get; }
|
||||
// public virtual Unit? Unit { set; get; }
|
||||
// public Guid ComplexId { set; get; }
|
||||
// }
|
||||
//}
|
||||
16
Complex.Domain/Entities/UnitCharge.cs
Normal file
16
Complex.Domain/Entities/UnitCharge.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
using Complex.Domain.Commons;
|
||||
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
[Auditable]
|
||||
public class UnitCost : BaseEntity<long>
|
||||
{
|
||||
public Guid CostCycleId { set; get; }
|
||||
public virtual CostCycle CostCycle { set; get; }
|
||||
public Guid UnitId { get; set; }
|
||||
public virtual Unit Unit { get; set; }
|
||||
public virtual Transaction Transaction { get; set; }
|
||||
public int? TransactionId { get; set; }
|
||||
public DateOnly Date { set; get; }
|
||||
}
|
||||
}
|
||||
20
Complex.Domain/Entities/UnitChargeType.cs
Normal file
20
Complex.Domain/Entities/UnitChargeType.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
//using Complex.Domain.Commons;
|
||||
|
||||
//namespace Complex.Domain.Entities
|
||||
//{
|
||||
// [Auditable]
|
||||
// public class UnitChargeCycle
|
||||
// {
|
||||
// public int Id { set; get; }
|
||||
// public Guid ChargeCycle { set; get; }
|
||||
// //public Guid ComplexId { set; get; }
|
||||
// public Guid UnitId { set; get; }
|
||||
// public virtual Unit Unit { set; get; }
|
||||
|
||||
// /// <summary>
|
||||
// /// null یعنی شارژ
|
||||
// /// </summary>
|
||||
// //public int? ChargeTypeId { set; get; }
|
||||
// public bool IsRemoved { set; get; }= false;
|
||||
// }
|
||||
//}
|
||||
15
Complex.Domain/Entities/UnitState.cs
Normal file
15
Complex.Domain/Entities/UnitState.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Complex.Domain.Commons;
|
||||
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// وضعیت که مدیر ثبت می کند
|
||||
/// </summary>
|
||||
[Auditable]
|
||||
public class UnitState : BaseEntity<int>
|
||||
{
|
||||
public Guid? ComplexId { set; get; }
|
||||
public string Title { set; get; }
|
||||
public string Icon { set; get; }
|
||||
}
|
||||
}
|
||||
20
Complex.Domain/Entities/UserToken.cs
Normal file
20
Complex.Domain/Entities/UserToken.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Complex.Domain.Commons;
|
||||
|
||||
namespace Complex.Domain.Entities
|
||||
{
|
||||
public class UserToken : BaseEntity
|
||||
{
|
||||
public string TokenHash { get; set; }
|
||||
public DateTime TokenExp { get; set; }
|
||||
public string RefreshToken { get; set; }
|
||||
public DateTime RefreshTokenExp { get; set; }
|
||||
|
||||
public string MobileModel { get; set; }
|
||||
|
||||
public Person Person { get; set; }
|
||||
/// <summary>
|
||||
/// mobileNumber
|
||||
/// </summary>
|
||||
public string PersonId { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user