This commit is contained in:
Paul Schneider 2026-02-14 16:54:27 +00:00
commit 45514010f2
3505 changed files with 154 additions and 523 deletions

View file

@ -1,9 +0,0 @@
using Yavsc.Interfaces;
public class CommentPost : IComment<long>
{
public long ReceiverId { get; set; }
public long? ParentId { get; set; }
public string Content { get; set; }
}

View file

@ -1,12 +0,0 @@
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; }
}
}

View file

@ -1,73 +0,0 @@
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";
}
}
}

View file

@ -1,18 +0,0 @@
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";
}
}

View file

@ -1,11 +0,0 @@
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; }
}
}

View file

@ -1,60 +0,0 @@
//
// 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);
}
}
}

View file

@ -1,24 +0,0 @@
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; }
}
}

View file

@ -1,13 +0,0 @@
namespace Yavsc.Models.Messaging
{
public enum Reason : byte
{
Private,
Corporate,
SearchingAPro,
Selling,
Buying,
ServiceProposal
}
}

View file

@ -1,10 +0,0 @@
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";
}
}