Initialize AyCode.Core v0.0.3
This commit is contained in:
parent
b5498f1ab8
commit
fba0edc86f
|
|
@ -1,10 +1,16 @@
|
||||||
using AyCode.Database.Tests.Users;
|
using AyCode.Database.Tests.Users;
|
||||||
using AyCode.Entities.Users;
|
using AyCode.Entities.Users;
|
||||||
|
using Mango.Database.DataLayers.Users;
|
||||||
|
using Mango.Database.DbContexts.Users;
|
||||||
|
using Mango.Entities.Addresses;
|
||||||
|
using Mango.Entities.Companies;
|
||||||
|
using Mango.Entities.Profiles;
|
||||||
|
using Mango.Entities.Users;
|
||||||
using Microsoft.ApplicationInsights;
|
using Microsoft.ApplicationInsights;
|
||||||
|
|
||||||
namespace Mango.Database.Test;
|
namespace Mango.Database.Test;
|
||||||
|
|
||||||
//[TestClass]
|
[TestClass]
|
||||||
//public class UserDalTests : AcUserDalTestBase<UserDal, UserDbContext, User, Profile, UserToken, TiamServiceProvider, UserToServiceProvider, Address>
|
public class UserDalTests : AcUserDalTestBase<UserDal, UserDbContext, User, Profile, UserToken, Company, UserToCompany, Address>
|
||||||
//{
|
{
|
||||||
//}
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
using AyCode.Database.DataLayers;
|
||||||
|
using AyCode.Database.DbContexts;
|
||||||
|
using Mango.Database.DbContexts;
|
||||||
|
using Microsoft.EntityFrameworkCore.Storage;
|
||||||
|
|
||||||
|
namespace Mango.Database.DataLayers;
|
||||||
|
|
||||||
|
public class DalBase<TDbContext> : AcDalBase<TDbContext>, IDalBase<TDbContext> where TDbContext : DbContextBase
|
||||||
|
{
|
||||||
|
//public DalBase() : base(new TransferDestinationDbContext("DeveloperDbConnection"))
|
||||||
|
//{
|
||||||
|
// Ctx.Database. }
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
using AyCode.Database.DataLayers;
|
||||||
|
using Mango.Database.DbContexts;
|
||||||
|
|
||||||
|
namespace Mango.Database.DataLayers;
|
||||||
|
|
||||||
|
public interface IDalBase : IAcDalBase
|
||||||
|
{ }
|
||||||
|
|
||||||
|
public interface IDalBase<TDbContext> : IAcDalBase<TDbContext>, IAcDalBase where TDbContext : DbContextBase
|
||||||
|
{ }
|
||||||
|
|
@ -0,0 +1,44 @@
|
||||||
|
using AyCode.Database.DataLayers.Users;
|
||||||
|
using Mango.Database.DbContexts.Users;
|
||||||
|
using Mango.Entities.Addresses;
|
||||||
|
using Mango.Entities.Companies;
|
||||||
|
using Mango.Entities.Profiles;
|
||||||
|
using Mango.Entities.Users;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace Mango.Database.DataLayers.Users
|
||||||
|
{
|
||||||
|
public class UserDal : AcUserDalBase<UserDbContext, User, Profile, UserToken, Company, UserToCompany, Address>, IDalBase<UserDbContext>
|
||||||
|
{
|
||||||
|
public UserDal() : base()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserDal(UserDbContext context)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<bool> CreateUserAsync(User user)
|
||||||
|
{
|
||||||
|
Context.Users.Add(user);
|
||||||
|
Console.WriteLine($@"Saving user to db {user.Id}, {user.EmailAddress}, {user.PhoneNumber}, {user.Password}");
|
||||||
|
return await Context.SaveChangesAsync() > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public async Task<bool> UpdateUserAsync(User user)
|
||||||
|
{
|
||||||
|
var existingUser = await Context.Users.CountAsync(u => u.EmailAddress == user.EmailAddress);
|
||||||
|
if (existingUser == 1)
|
||||||
|
{
|
||||||
|
//user.Modified = DateTime.UtcNow; //ezt nem kell megadni, a háttérben ezt magától megcsinálja a DbContextBase - J.
|
||||||
|
Context.Users.Update(user);
|
||||||
|
return await Context.SaveChangesAsync() > 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new Exception("User not found");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
using AyCode.Database.DbContexts.Users;
|
||||||
|
using Mango.Database.DbSets.Addresses;
|
||||||
|
using Mango.Database.DbSets.Emails;
|
||||||
|
using Mango.Database.DbSets.Users;
|
||||||
|
using Mango.Entities.Addresses;
|
||||||
|
using Mango.Entities.Companies;
|
||||||
|
using Mango.Entities.Profiles;
|
||||||
|
using Mango.Entities.Users;
|
||||||
|
|
||||||
|
namespace Mango.Database.DbContexts.Users;
|
||||||
|
|
||||||
|
public interface IUserDbContext : IAcUserDbContextBase<User, Profile, UserToken, Company, UserToCompany, Address>, IUserDbSet, IAddressDbSet, IEmailMessageDbSet
|
||||||
|
{ }
|
||||||
|
|
@ -0,0 +1,52 @@
|
||||||
|
using Mango.Entities.Addresses;
|
||||||
|
using Mango.Entities.Messages.Emails;
|
||||||
|
using Mango.Entities.Profiles;
|
||||||
|
using Mango.Entities.Users;
|
||||||
|
using Microsoft.EntityFrameworkCore;
|
||||||
|
|
||||||
|
namespace Mango.Database.DbContexts.Users
|
||||||
|
{
|
||||||
|
public class UserDbContext : DbContextBase, IUserDbContext
|
||||||
|
{
|
||||||
|
public DbSet<User> Users { get; set; }
|
||||||
|
public DbSet<UserToken> UserTokens { get; set; }
|
||||||
|
|
||||||
|
public DbSet<Profile> Profiles { get; set; }
|
||||||
|
public DbSet<Address> Addresses { get; set; }
|
||||||
|
|
||||||
|
public DbSet<EmailMessage> EmailMessages { get; set; }
|
||||||
|
|
||||||
|
public UserDbContext() //: this(string.Empty)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserDbContext(DbContextOptions<UserDbContext> options) //: this(string.Empty)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserDbContext(string name) : base(name)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public UserDbContext(DbContextOptions<DbContext> options, string name) : base(options, name)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||||
|
{
|
||||||
|
base.OnConfiguring(optionsBuilder);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||||
|
{
|
||||||
|
base.OnModelCreating(modelBuilder);
|
||||||
|
|
||||||
|
//new UserEntityTypeDefaultConfiguration().Configure(modelBuilder.Entity<User>());
|
||||||
|
//new ProfileEntityTypeConfigurations().Configure(modelBuilder.Entity<Profile>());
|
||||||
|
|
||||||
|
//new EmailMessageEntityTypeDefaultConfigurations().Configure(modelBuilder.Entity<EmailMessage>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
using AyCode.Database.DbSets.Addresses;
|
||||||
|
using Mango.Entities.Addresses;
|
||||||
|
|
||||||
|
namespace Mango.Database.DbSets.Addresses;
|
||||||
|
|
||||||
|
public interface IAddressDbSet : IAcAddressDbSetBase<Address>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
namespace Mango.Database.DbSets.Emails;
|
||||||
|
|
||||||
|
public static class EmailMessageDbSetExtension
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
using AyCode.Database.DbSets.Messages;
|
||||||
|
using Mango.Entities.Messages.Emails;
|
||||||
|
|
||||||
|
namespace Mango.Database.DbSets.Emails;
|
||||||
|
|
||||||
|
public interface IEmailMessageDbSet : IAcEmailMessageDbSet<EmailMessage>
|
||||||
|
{ }
|
||||||
|
|
@ -0,0 +1,11 @@
|
||||||
|
using AyCode.Database.DbSets.Users;
|
||||||
|
using Mango.Entities.Addresses;
|
||||||
|
using Mango.Entities.Companies;
|
||||||
|
using Mango.Entities.Profiles;
|
||||||
|
using Mango.Entities.Users;
|
||||||
|
|
||||||
|
namespace Mango.Database.DbSets.Users;
|
||||||
|
|
||||||
|
public interface IUserDbSet : IAcUserDbSet<User, Profile, Company, UserToCompany, Address>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
using AyCode.Database.DbSets.Users;
|
||||||
|
using Mango.Entities.Users;
|
||||||
|
|
||||||
|
namespace Mango.Database.DbSets.Users;
|
||||||
|
|
||||||
|
public interface IUserTokenDbSet : IAcUserTokenDbSet<UserToken>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
using Mango.Entities.Users;
|
||||||
|
|
||||||
|
namespace Mango.Database.DbSets.Users;
|
||||||
|
|
||||||
|
public static class UserDbSetExtensions
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -47,13 +47,16 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="DbContexts\" />
|
<Folder Include="DbContexts\Admins\" />
|
||||||
|
<Folder Include="ModelBuilders\" />
|
||||||
|
<Folder Include="Extensions\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.4" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.4" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="8.0.4" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="8.0.4" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.4" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -14,4 +14,33 @@
|
||||||
<Folder Include="Users\" />
|
<Folder Include="Users\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Mango.Core.Server\Mango.Core.Server.csproj" />
|
||||||
|
<ProjectReference Include="..\Mango.Core\Mango.Core.csproj" />
|
||||||
|
<ProjectReference Include="..\Mango.Entities\Mango.Entities.csproj" />
|
||||||
|
<ProjectReference Include="..\Mango.Interfaces.Server\Mango.Interfaces.Server.csproj" />
|
||||||
|
<ProjectReference Include="..\Mango.Interfaces\Mango.Interfaces.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="AyCode.Core">
|
||||||
|
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\Debug\net8.0\AyCode.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="AyCode.Core.Server">
|
||||||
|
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\Debug\net8.0\AyCode.Core.Server.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="AyCode.Entities">
|
||||||
|
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\Debug\net8.0\AyCode.Entities.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="AyCode.Entities.Server">
|
||||||
|
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\Debug\net8.0\AyCode.Entities.Server.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="AyCode.Interfaces">
|
||||||
|
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\Debug\net8.0\AyCode.Interfaces.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="AyCode.Interfaces.Server">
|
||||||
|
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\Debug\net8.0\AyCode.Interfaces.Server.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using AyCode.Entities.Addresses;
|
||||||
|
using Mango.Interfaces.Addresses;
|
||||||
|
|
||||||
|
namespace Mango.Entities.Addresses;
|
||||||
|
|
||||||
|
[Table(nameof(Address))]
|
||||||
|
public class Address : AcAddress, IAddress
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using AyCode.Entities.ServiceProviders;
|
||||||
|
using Mango.Entities.Users;
|
||||||
|
using Mango.Interfaces.Companies;
|
||||||
|
|
||||||
|
namespace Mango.Entities.Companies;
|
||||||
|
|
||||||
|
[Table("ServiceProviders")]
|
||||||
|
public class Company : AcServiceProvider<User, UserToCompany>, ICompany<User, UserToCompany>, ICompanyBase
|
||||||
|
{
|
||||||
|
public Company()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public Company(string name, Guid ownerId) : this(Guid.NewGuid(), name, ownerId)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public Company(Guid id, string name, Guid ownerId) : this(id, name, ownerId, Guid.NewGuid())
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public Company(Guid id, string name, Guid ownerId, Guid affiliateId) : base(id, name, ownerId, affiliateId)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -6,4 +6,26 @@
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Mango.Core\Mango.Core.csproj" />
|
||||||
|
<ProjectReference Include="..\Mango.Interfaces\Mango.Interfaces.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="AyCode.Core">
|
||||||
|
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\Debug\net8.0\AyCode.Core.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="AyCode.Entities">
|
||||||
|
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\Debug\net8.0\AyCode.Entities.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="AyCode.Interfaces">
|
||||||
|
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\Debug\net8.0\AyCode.Interfaces.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Messages\Chats\" />
|
||||||
|
<Folder Include="Messages\Forums\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using AyCode.Entities.Messages;
|
||||||
|
|
||||||
|
namespace Mango.Entities.Messages.Emails;
|
||||||
|
|
||||||
|
[Table(nameof(EmailMessage))]
|
||||||
|
public class EmailMessage : AcEmailMessage<EmailRecipient> //IEntityGuid, ITimeStampInfo, IEmailRecipientsRelation, IEmailAddress
|
||||||
|
{
|
||||||
|
public EmailMessage()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public EmailMessage(Guid id, Guid? senderId, Guid contextId, string subject, string? text, string emailAddress) : base(id, senderId, contextId, subject, text, emailAddress)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using AyCode.Entities.Messages;
|
||||||
|
|
||||||
|
namespace Mango.Entities.Messages.Emails;
|
||||||
|
|
||||||
|
[Table(nameof(EmailRecipient))]
|
||||||
|
public class EmailRecipient : AcEmailRecipient<EmailMessage> //IEntityGuid, ITimeStampInfo, IEmailMessageRelation, IEmailAddress
|
||||||
|
{
|
||||||
|
public EmailRecipient()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public EmailRecipient(Guid id, Guid recipientId, Guid emailMessageId, string emailAddress) : base(id, recipientId, emailMessageId, emailAddress)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
using AyCode.Interfaces.Messages;
|
||||||
|
using Mango.Interfaces.Emails;
|
||||||
|
|
||||||
|
namespace Mango.Entities.Messages.Emails;
|
||||||
|
|
||||||
|
public interface IEmailMessageRelation : IEmailMessageRelation<EmailMessage>
|
||||||
|
{ }
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
using AyCode.Interfaces.Messages;
|
||||||
|
using Mango.Interfaces.Emails;
|
||||||
|
|
||||||
|
namespace Mango.Entities.Messages.Emails;
|
||||||
|
|
||||||
|
public interface IEmailRecipientsRelation : IEmailRecipientsRelation<EmailRecipient>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
using AyCode.Interfaces.Messages;
|
||||||
|
using Mango.Interfaces.Emails;
|
||||||
|
|
||||||
|
namespace Mango.Entities.Messages.Emails;
|
||||||
|
|
||||||
|
public interface IMessageSenderService : IMessageSenderService<EmailMessage, EmailRecipient>
|
||||||
|
{}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
using AyCode.Entities.Profiles;
|
||||||
|
using Mango.Entities.Addresses;
|
||||||
|
using Mango.Interfaces.Profiles;
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
|
namespace Mango.Entities.Profiles;
|
||||||
|
|
||||||
|
[Table(nameof(Profile))]
|
||||||
|
public class Profile : AcProfile<Address>, IProfile<Address>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using AyCode.Entities.Users;
|
||||||
|
using Mango.Entities.Addresses;
|
||||||
|
using Mango.Entities.Companies;
|
||||||
|
using Mango.Entities.Profiles;
|
||||||
|
using Mango.Interfaces.Users;
|
||||||
|
|
||||||
|
namespace Mango.Entities.Users
|
||||||
|
{
|
||||||
|
[Table("Users")]
|
||||||
|
public class User : AcUser<Profile, Company, UserToCompany, Address>, IUser<Profile, Company, UserToCompany, Address>
|
||||||
|
{
|
||||||
|
public User() { }
|
||||||
|
public User(string email, string password) : this(Guid.NewGuid(), email, password) { }
|
||||||
|
public User(Guid id, string email, string password) : base(id, email, password)
|
||||||
|
{ }
|
||||||
|
public User(Guid id, string email, string phoneNumber, string password) : base(id, email, phoneNumber, password)
|
||||||
|
{ }
|
||||||
|
public User(Guid id, string email, string phoneNumber, string password, string refreshToken) : base(id, email, phoneNumber, password, refreshToken)
|
||||||
|
{ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
using AyCode.Entities.Users;
|
||||||
|
using Mango.Entities.Companies;
|
||||||
|
using Mango.Interfaces.Users;
|
||||||
|
|
||||||
|
namespace Mango.Entities.Users;
|
||||||
|
|
||||||
|
public class UserToCompany : AcUserToServiceProvider<User, Company>, IUserToCompany<User, Company>
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using AyCode.Entities.Users;
|
||||||
|
using Mango.Interfaces.Users;
|
||||||
|
|
||||||
|
namespace Mango.Entities.Users;
|
||||||
|
|
||||||
|
[Table(nameof(UserToken))]
|
||||||
|
public class UserToken : AcUserTokenBase, IUserToken
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
using AyCode.Interfaces.Messages;
|
||||||
|
|
||||||
|
namespace Mango.Interfaces.Emails;
|
||||||
|
|
||||||
|
public interface IEmailMessage : IAcEmailMessage<IEmailRecipientBase>, IEmailMessageBase
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
using AyCode.Interfaces.Messages;
|
||||||
|
|
||||||
|
namespace Mango.Interfaces.Emails;
|
||||||
|
|
||||||
|
public interface IEmailMessageBase : IAcEmailMessageBase
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
using AyCode.Interfaces.Messages;
|
||||||
|
|
||||||
|
namespace Mango.Interfaces.Emails;
|
||||||
|
|
||||||
|
public interface IEmailMessageForeignKey : IAcEmailMessageForeignKey
|
||||||
|
{ }
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
using AyCode.Interfaces.Messages;
|
||||||
|
using System.Net.Mail;
|
||||||
|
|
||||||
|
namespace Mango.Interfaces.Emails;
|
||||||
|
|
||||||
|
public interface IEmailMessageRelation<TEmailMessage> : IAcEmailMessageRelation<TEmailMessage>, IEmailMessageForeignKey where TEmailMessage : IAcEmailMessageBase
|
||||||
|
{ }
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
using AyCode.Interfaces.Messages;
|
||||||
|
|
||||||
|
namespace Mango.Interfaces.Emails;
|
||||||
|
|
||||||
|
public interface IEmailRecipient : IAcEmailRecipient<IEmailMessage>, IEmailRecipientBase
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
using AyCode.Interfaces.Messages;
|
||||||
|
|
||||||
|
namespace Mango.Interfaces.Emails;
|
||||||
|
|
||||||
|
public interface IEmailRecipientBase : IAcEmailRecipientBase
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
using AyCode.Interfaces.Messages;
|
||||||
|
|
||||||
|
namespace Mango.Interfaces.Emails;
|
||||||
|
|
||||||
|
public interface IEmailRecipientsRelation<TEmailRecipient> : IAcEmailRecipientsRelation<TEmailRecipient> where TEmailRecipient : IAcEmailRecipientBase
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
using AyCode.Interfaces.Messages;
|
||||||
|
|
||||||
|
namespace Mango.Interfaces.Emails;
|
||||||
|
|
||||||
|
public interface IMessageSenderService<TEmailMessage, TEmailRecipient> : IAcMessageSenderService<TEmailMessage, TEmailRecipient>
|
||||||
|
where TEmailMessage : IAcEmailMessage<TEmailRecipient>
|
||||||
|
where TEmailRecipient : IAcEmailRecipientBase
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -6,11 +6,6 @@
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Emails\" />
|
|
||||||
<Folder Include="Users\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Mango.Core\Mango.Core.csproj" />
|
<ProjectReference Include="..\Mango.Core\Mango.Core.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
using AyCode.Interfaces.Users;
|
||||||
|
using Mango.Interfaces.Addresses;
|
||||||
|
using Mango.Interfaces.Companies;
|
||||||
|
using Mango.Interfaces.Profiles;
|
||||||
|
|
||||||
|
namespace Mango.Interfaces.Users;
|
||||||
|
|
||||||
|
public interface IUser<TProfile, TCompany, TUserToCompany, TProfileAddress> : IAcUser<TProfile, TCompany, TUserToCompany, TProfileAddress>, IUserDto<TProfile, TCompany, TUserToCompany, TProfileAddress>, IUserBase
|
||||||
|
where TProfile : class, IProfile<TProfileAddress>
|
||||||
|
where TCompany : class, ICompanyBase
|
||||||
|
where TUserToCompany : class, IUserToCompanyBase
|
||||||
|
where TProfileAddress : class, IAddress
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
using AyCode.Interfaces.Users;
|
using AyCode.Interfaces.ServiceProviders;
|
||||||
|
using AyCode.Interfaces.Users;
|
||||||
namespace Mango.Interfaces.Users;
|
namespace Mango.Interfaces.Users;
|
||||||
|
|
||||||
public interface IUserBase : IAcUserBase
|
public interface IUserBase : IAcUserBase
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
using AyCode.Interfaces.Users;
|
||||||
|
|
||||||
|
namespace Mango.Interfaces.Users;
|
||||||
|
|
||||||
|
public interface IUserToken : IAcUserTokenBase
|
||||||
|
{ }
|
||||||
|
|
||||||
Loading…
Reference in New Issue