reorg
This commit is contained in:
parent
d000f77098
commit
40e8e08690
3487 changed files with 39 additions and 21 deletions
9
src/Yavsc.Abstract/Messaging/Comment.cs
Normal file
9
src/Yavsc.Abstract/Messaging/Comment.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
|
||||
using Yavsc.Interfaces;
|
||||
|
||||
public class CommentPost : IComment<long>
|
||||
{
|
||||
public long ReceiverId { get; set; }
|
||||
public long? ParentId { get; set; }
|
||||
public string Article { get; set; }
|
||||
}
|
||||
12
src/Yavsc.Abstract/Messaging/IAnnounce.cs
Normal file
12
src/Yavsc.Abstract/Messaging/IAnnounce.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Yavsc.Interfaces;
|
||||
|
||||
namespace Yavsc.Models.Messaging
|
||||
{
|
||||
public interface IAnnounce : IOwned {
|
||||
Reason For { get; set; }
|
||||
string Message { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
73
src/Yavsc.Abstract/Messaging/Notification.cs
Normal file
73
src/Yavsc.Abstract/Messaging/Notification.cs
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Abstract.Models.Messaging
|
||||
{
|
||||
/// <summary>
|
||||
/// A Notification, that mocks the one sent to Google,
|
||||
/// since it fits my needs
|
||||
/// </summary>
|
||||
public class Notification
|
||||
{
|
||||
[Key, DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
/// <summary>
|
||||
/// The title.
|
||||
/// </summary>
|
||||
[Required, Display(Name = "Titre")]
|
||||
[StringLength(1024)]
|
||||
public string title { get; set; }
|
||||
/// <summary>
|
||||
/// The body.
|
||||
/// </summary>
|
||||
[StringLength(512)]
|
||||
[Required, Display(Name = "Corps")]
|
||||
public string body { get; set; }
|
||||
/// <summary>
|
||||
/// The icon.
|
||||
/// </summary>
|
||||
[StringLength(512)]
|
||||
[Display(Name = "Icône")]
|
||||
public string? icon { get; set; }
|
||||
/// <summary>
|
||||
/// The sound.
|
||||
/// </summary>
|
||||
[StringLength(512)]
|
||||
[Display(Name = "Son")]
|
||||
public string? sound { get; set; }
|
||||
/// <summary>
|
||||
/// The tag.
|
||||
/// </summary>
|
||||
[StringLength(512)]
|
||||
[Display(Name = "Tag")]
|
||||
public string? tag { get; set; }
|
||||
/// <summary>
|
||||
/// The color.
|
||||
/// </summary>
|
||||
[StringLength(512)]
|
||||
[Display(Name = "Couleur")]
|
||||
public string? color { get; set; }
|
||||
/// <summary>
|
||||
/// The click action.
|
||||
/// </summary>
|
||||
[StringLength(512)]
|
||||
[Required, Display(Name = "Label du click")]
|
||||
public string click_action { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// When null, this must be seen by everynone.
|
||||
/// <c>user/{UserId}<c> : it's for this user, and only this one, specified by ID,
|
||||
/// <c>pub/cga</c> : the public "cga" topic
|
||||
/// <c>administration</c> : for admins ...
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[StringLength(512)]
|
||||
public string? Target { get; set; }
|
||||
|
||||
public Notification()
|
||||
{
|
||||
icon = "exclam";
|
||||
}
|
||||
}
|
||||
}
|
||||
18
src/Yavsc.Abstract/Messaging/NotificationTypes.cs
Normal file
18
src/Yavsc.Abstract/Messaging/NotificationTypes.cs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
namespace Yavsc
|
||||
{
|
||||
public static class NotificationTypes {
|
||||
public const string Connected = "connected";
|
||||
public const string DisConnected = "disconnected";
|
||||
public const string Reconnected = "reconnected";
|
||||
public const string UserPart = "userpart";
|
||||
public const string UserJoin = "userjoin";
|
||||
public const string Kick = "kick";
|
||||
public const string Ban = "ban";
|
||||
public const string KickBan = "kickban";
|
||||
public const string Gline = "gline";
|
||||
public const string PrivateMessageDenied = "denied_pv";
|
||||
public const string Error = "error";
|
||||
public const string ContactRefused = "contact_refused";
|
||||
public const string ExistingUserName ="existing_user_name";
|
||||
}
|
||||
}
|
||||
11
src/Yavsc.Abstract/Messaging/PublicStreamInfo.cs
Normal file
11
src/Yavsc.Abstract/Messaging/PublicStreamInfo.cs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
namespace Yavsc.Models.Messaging
|
||||
{
|
||||
public class PublicStreamInfo
|
||||
{
|
||||
public long id { get; set; }
|
||||
public string sender { get; set; }
|
||||
public string title { get; set; }
|
||||
public string url { get; set; }
|
||||
public string mediaType { get; set; }
|
||||
}
|
||||
}
|
||||
60
src/Yavsc.Abstract/Messaging/RdvQueryEvent.cs
Normal file
60
src/Yavsc.Abstract/Messaging/RdvQueryEvent.cs
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
//
|
||||
// BookQueryEvent.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paul@pschneider.fr>
|
||||
//
|
||||
// Copyright (c) 2015-2016 GNU GPL
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
namespace Yavsc.Models.Messaging
|
||||
{
|
||||
using Interfaces.Workflow;
|
||||
using Yavsc.Abstract.Messaging;
|
||||
|
||||
public class RdvQueryEvent: RdvQueryProviderInfo, IEvent
|
||||
{
|
||||
public string SubTopic
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public RdvQueryEvent(string subTopic)
|
||||
{
|
||||
Topic = Topics.RdvQuery;
|
||||
SubTopic = subTopic;
|
||||
}
|
||||
|
||||
public string Sender
|
||||
{
|
||||
get; set;
|
||||
}
|
||||
|
||||
public string Topic
|
||||
{
|
||||
get; private set;
|
||||
}
|
||||
|
||||
public string CreateBody()
|
||||
{
|
||||
return string.Format(Resources.RdvToPerf,
|
||||
Client.UserName,
|
||||
EventDate?.ToString("dddd dd/MM/yyyy à HH:mm"),
|
||||
Location.Address,
|
||||
ActivityCode);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
24
src/Yavsc.Abstract/Messaging/RdvQueryProviderInfo.cs
Normal file
24
src/Yavsc.Abstract/Messaging/RdvQueryProviderInfo.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
using System;
|
||||
using Yavsc.Abstract.Identity;
|
||||
using Yavsc.Models.Relationship;
|
||||
|
||||
namespace Yavsc.Models
|
||||
{
|
||||
|
||||
public class RdvQueryProviderInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// User querying
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
public ClientProviderInfo Client { get; set; }
|
||||
public Location Location { get; set; }
|
||||
public long Id { get; set; }
|
||||
public DateTime? EventDate { get; set; }
|
||||
public decimal? Previsional { get; set; }
|
||||
public string Reason { get; set; }
|
||||
public string ActivityCode { get; set; }
|
||||
public string BillingCode { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
13
src/Yavsc.Abstract/Messaging/Reason.cs
Normal file
13
src/Yavsc.Abstract/Messaging/Reason.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
namespace Yavsc.Models.Messaging
|
||||
{
|
||||
public enum Reason : byte
|
||||
{
|
||||
Private,
|
||||
Corporate,
|
||||
SearchingAPro,
|
||||
Selling,
|
||||
Buying,
|
||||
ServiceProposal
|
||||
}
|
||||
|
||||
}
|
||||
10
src/Yavsc.Abstract/Messaging/Topics.cs
Normal file
10
src/Yavsc.Abstract/Messaging/Topics.cs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
namespace Yavsc.Abstract.Messaging
|
||||
{
|
||||
public static class Topics {
|
||||
public static readonly string General = "/topic/general";
|
||||
public static readonly string RdvQuery = "/topic/RdvQuery";
|
||||
public static readonly string Estimation = "/topic/Estimation";
|
||||
public static readonly string HairCutQuery = "/topic/HairCutQuery";
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue