This commit is contained in:
parent
46f5c107b8
commit
fa34ed249b
233 changed files with 4000 additions and 1396 deletions
47
Yavsc/Model/Messaging/BaseEvent.cs
Normal file
47
Yavsc/Model/Messaging/BaseEvent.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
//
|
||||
// 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: 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; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
49
Yavsc/Model/Messaging/BookQueryEvent.cs
Normal file
49
Yavsc/Model/Messaging/BookQueryEvent.cs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Models.Messaging
|
||||
{
|
||||
|
||||
//
|
||||
// BookQueryEvent.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/>.
|
||||
|
||||
public class BookQueryEvent: YaEvent
|
||||
{
|
||||
/// <summary>
|
||||
/// The location.
|
||||
/// </summary>
|
||||
[Display(Name="Location")]
|
||||
public Location Location { get; set; }
|
||||
/// <summary>
|
||||
/// The start date.
|
||||
/// </summary>
|
||||
[Display(Name="StartDate")]
|
||||
public DateTime StartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the end date.
|
||||
/// </summary>
|
||||
/// <value>The end date.</value>
|
||||
[Display(Name="EndDate")]
|
||||
public DateTime EndDate { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
43
Yavsc/Model/Messaging/CircleEvent.cs
Normal file
43
Yavsc/Model/Messaging/CircleEvent.cs
Normal 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; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
50
Yavsc/Model/Messaging/Notification.cs
Normal file
50
Yavsc/Model/Messaging/Notification.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
57
Yavsc/Model/Messaging/YaEvent.cs
Normal file
57
Yavsc/Model/Messaging/YaEvent.cs
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
//
|
||||
// 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 name of the NF provider.
|
||||
/// </summary>
|
||||
[Display(Name="ProviderName")]
|
||||
public string ProviderName { get; set; } = Constants.ApplicationName;
|
||||
/// <summary>
|
||||
/// The NF provider identifier.
|
||||
/// </summary>
|
||||
[Display(Name="ProviderId")]
|
||||
public string ProviderId { get; set; }
|
||||
/// <summary>
|
||||
/// The promotion code.
|
||||
/// </summary>
|
||||
[Display(Name="Comment")]
|
||||
public string Comment { 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; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue