renamed the base name of the model

This commit is contained in:
Paul Schneider 2016-11-28 15:14:58 +01:00
commit 83ca421100
104 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,63 @@
//
// BaseEvent.cs
//
// Author:
// Paul Schneider <paul@pschneider.fr>
//
// Copyright (c) 2015 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/>.
using System.ComponentModel.DataAnnotations;
using Yavsc.Interfaces;
namespace Yavsc.Models.Messaging
{
/// <summary>
/// Base event.
/// </summary>
public class BaseEvent : IEvent {
public BaseEvent()
{
Topic = GetType().Name;
}
public BaseEvent(string topic)
{
Topic = topic;
}
public string Topic { get; set; }
public string Sender { get; set; }
public string Message { get; set; }
}
public class GeneralEvent: BaseEvent, ITitle
{
/// <summary>
/// The title.
/// </summary>
[Required(ErrorMessageResourceName="ChooseATitle")]
[Display(Name="Title")]
public string Title { get; set; }
/// <summary>
/// The description.
/// </summary>
[Required(ErrorMessageResourceName="ChooseADescription")]
[Display(Name="Description")]
public string Description { get; set; }
}
}

View file

@ -0,0 +1,50 @@
namespace Yavsc.Models.Messaging
{
using Yavsc.Model;
//
// 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/>.
public class BookQueryEvent: BookQueryProviderInfo, IEvent
{
public BookQueryEvent()
{
Topic = "BookQuery";
}
public string Message
{
get; set;
}
public string Sender
{
get; set;
}
public string Topic
{
get; set;
}
}
}

View file

@ -0,0 +1,16 @@
using System;
namespace Yavsc.Model
{
public class BookQueryProviderInfo
{
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; }
}
}

View file

@ -0,0 +1,43 @@
//
// EventPub.cs
//
// Author:
// Paul Schneider <paulschneider@free.fr>
//
// Copyright (c) 2015 Paul Schneider
//
// 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/>.
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Messaging
{
/// <summary>
/// Event pub.
/// </summary>
public class CircleEvent: YaEvent
{
/// <summary>
/// Gets or sets the circles.
/// </summary>
/// <value>The circles.</value>
[Required(ErrorMessageResourceName="DoSpecifyCircles"),
Display(Name="Circles")]
public virtual List<Circle> Circles{ get; set; }
}
}

View file

@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Model
{
public class ClientProviderInfo
{
public string UserName { get; set; }
public string Avatar { get; set; }
[Key]
public string UserId { get; set; }
public int Rate { get; set; }
public string EMail { get; set; }
public string Phone { get; set; }
public Location BillingAddress { get; set; }
public string ChatHubConnectionId { get; set; }
}
}

View file

@ -0,0 +1,50 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.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 = "Title")]
public string title { get; set; }
/// <summary>
/// The body.
/// </summary>
[Required, Display(Name = "Title")]
public string body { get; set; }
/// <summary>
/// The icon.
/// </summary>
[Display(Name = "Icon")]
public string icon { get; set; }
/// <summary>
/// The sound.
/// </summary>
[Display(Name = "Sound")]
public string sound { get; set; }
/// <summary>
/// The tag.
/// </summary>
[Display(Name = "Tag")]
public string tag { get; set; }
/// <summary>
/// The color.
/// </summary>
[Display(Name = "Color")]
public string color { get; set; }
/// <summary>
/// The click action.
/// </summary>
[Required, Display(Name = "Click action")]
public string click_action { get; set; }
}
}

View file

@ -0,0 +1,48 @@
//
// NFEvent.cs
//
// Author:
// Paul Schneider <paulschneider@free.fr>
//
// Copyright (c) 2015 Paul Schneider
//
// 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/>.
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Messaging
{
/// <summary>
/// NF event.
/// </summary>
public class YaEvent : BaseEvent
{
/// <summary>
/// The NF provider identifier.
/// </summary>
[Display(Name="From")]
public string FromUserName { get; set; }
/// <summary>
/// The event web page.
/// </summary>
[Display(Name="EventWebPage")]
public string EventWebPage { get; set; }
/// <summary>
/// The image locator.
/// </summary>
[Display(Name="Photo")]
public string Photo { get; set; }
}
}