This commit is contained in:
jozsef.b@aycode.com 2023-11-27 17:01:43 +01:00
commit cf2430da4b
14 changed files with 97 additions and 14 deletions

View File

@ -5,7 +5,7 @@ using System.Reflection.Emit;
using System.Security.Principal;
using System.Text;
using System.Threading.Tasks;
using AyCode.Entities.Interfaces;
using AyCode.Interfaces.Entities;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

View File

@ -10,4 +10,8 @@
<ProjectReference Include="..\AyCode.Interfaces\AyCode.Interfaces.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Interfaces\" />
</ItemGroup>
</Project>

View File

@ -1,5 +1,5 @@
using AyCode.Entities.Interfaces;
using AyCode.Interfaces.TimeStampInfo;
using AyCode.Interfaces.Entities;
namespace AyCode.Entities.Locations;

View File

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using AyCode.Interfaces.Messages;
namespace AyCode.Entities.Messages
{
[Table("Messages")]
public class MessageBase : IMessageBase
{
public MessageBase() { }
public MessageBase(Guid sender, Guid receiver, string message) : this(Guid.NewGuid(), sender, receiver, message) { }
public MessageBase(Guid id, Guid sender, Guid receiver, string message) : this()
{
Id = id;
Sender = sender;
Receiver = receiver;
Message = message;
}
[Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
public Guid Sender { get; set; }
public Guid Receiver { get; set; }
public string Message { get; set; }
public Guid Id { get; set; }
public DateTime Created { get; set; }
public DateTime Modified { get; set; }
}
}

View File

@ -1,7 +1,7 @@
using AyCode.Entities.Interfaces;
using AyCode.Interfaces;
using AyCode.Interfaces;
using AyCode.Interfaces.TimeStampInfo;
using AyCode.Interfaces.MediaInfo;
using AyCode.Interfaces.Entities;
namespace AyCode.Entities.Profiles;

View File

@ -1,4 +1,5 @@
using AyCode.Entities.Interfaces;

using AyCode.Interfaces.Entities;
using AyCode.Interfaces.TimeStampInfo;
namespace AyCode.Entities.Users;

View File

@ -1,11 +1,8 @@
using System;
using System.Collections.Generic;

using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AyCode.Entities.Interfaces
namespace AyCode.Interfaces.Entities
{
public interface IEntity
{

View File

@ -1,4 +1,4 @@
namespace AyCode.Entities.Interfaces;
namespace AyCode.Interfaces.Entities;
public interface IEntityGuid : IEntity<Guid>
{

View File

@ -1,4 +1,4 @@
namespace AyCode.Entities.Interfaces;
namespace AyCode.Interfaces.Entities;
public interface IEntityInt : IEntity<int>
{

View File

@ -0,0 +1,11 @@

using AyCode.Interfaces.Entities;
using AyCode.Interfaces.TimeStampInfo;
namespace AyCode.Interfaces.Messages
{
public interface IMessageBase : IEntityGuid, ITimeStampInfo, IMessageParticipants
{
string Message { get; }
}
}

View File

@ -0,0 +1,8 @@

namespace AyCode.Interfaces.Messages
{
public interface IMessageParticipants : IMessageSender, IMessageReceiver
{
}
}

View File

@ -0,0 +1,9 @@
using AyCode.Interfaces.Entities;
namespace AyCode.Interfaces.Messages
{
public interface IMessageReceiver : IEntityGuid
{
}
}

View File

@ -0,0 +1,10 @@

using AyCode.Interfaces.Entities;
namespace AyCode.Interfaces.Messages
{
public interface IMessageSender : IEntityGuid
{
}
}

View File

@ -0,0 +1,7 @@
namespace AyCode.Interfaces.Messages
{
internal interface IMessageSenderService
{
public Task SendMessageAsync(IMessageBase message);
}
}