refactoring
This commit is contained in:
parent
71f0d756b3
commit
d327f4d77e
18 changed files with 91 additions and 96 deletions
|
|
@ -1,64 +0,0 @@
|
|||
//
|
||||
// Circle.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;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Circle.
|
||||
/// </summary>
|
||||
public class Circle
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the title.
|
||||
/// </summary>
|
||||
/// <value>The title.</value>
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the users.
|
||||
/// </summary>
|
||||
/// <value>The users.</value>
|
||||
public string [] Users { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Union the specified that.
|
||||
/// </summary>
|
||||
/// <param name="that">That.</param>
|
||||
public static string [] Union (Circle []those)
|
||||
{
|
||||
List<string> content = new List<string>();
|
||||
foreach (Circle c in those) {
|
||||
foreach (string user_name in c.Users) {
|
||||
if (!content.Contains (user_name))
|
||||
content.Add (user_name);
|
||||
}
|
||||
}
|
||||
return content.ToArray ();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
//
|
||||
// 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;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.ApiControllers.Calendar.Model;
|
||||
using Yavsc.Model;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Event pub.
|
||||
/// </summary>
|
||||
public class EventPub: YaEvent
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the circles.
|
||||
/// </summary>
|
||||
/// <value>The circles.</value>
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="Circles")]
|
||||
public Circle[] Circles { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1,61 +0,0 @@
|
|||
//
|
||||
// OpenDay.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;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Open day.
|
||||
/// </summary>
|
||||
public class OpenDay {
|
||||
/// <summary>
|
||||
/// The day.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public WeekDay Day;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the s.
|
||||
/// </summary>
|
||||
/// <value>The s.</value>
|
||||
public TimeSpan S { get; set; }
|
||||
|
||||
// ASSERT Start <= End
|
||||
/// <summary>
|
||||
/// Gets or sets the start hour.
|
||||
/// </summary>
|
||||
/// <value>The start.</value>
|
||||
[Required]
|
||||
public TimeSpan Start { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the end hour
|
||||
/// (from the next day if lower than the Start).
|
||||
/// </summary>
|
||||
/// <value>The end.</value>
|
||||
[Required]
|
||||
public TimeSpan End { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
//
|
||||
// Period.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;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Hollydays.
|
||||
/// </summary>
|
||||
public class Period {
|
||||
/// <summary>
|
||||
/// Gets or sets the start.
|
||||
/// </summary>
|
||||
/// <value>The start.</value>
|
||||
[Required]
|
||||
public DateTime Start { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the end.
|
||||
/// </summary>
|
||||
/// <value>The end.</value>
|
||||
[Required]
|
||||
public DateTime End { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
//
|
||||
// Periodicity.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;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Periodicity.
|
||||
/// </summary>
|
||||
public enum Periodicity {
|
||||
/// <summary>
|
||||
/// The daily.
|
||||
/// </summary>
|
||||
Daily,
|
||||
/// <summary>
|
||||
/// The weekly.
|
||||
/// </summary>
|
||||
Weekly,
|
||||
/// <summary>
|
||||
/// The monthly.
|
||||
/// </summary>
|
||||
Monthly,
|
||||
/// <summary>
|
||||
/// The three m.
|
||||
/// </summary>
|
||||
ThreeM,
|
||||
/// <summary>
|
||||
/// The six m.
|
||||
/// </summary>
|
||||
SixM,
|
||||
/// <summary>
|
||||
/// The yearly.
|
||||
/// </summary>
|
||||
Yearly
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
//
|
||||
// Position.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;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Position.
|
||||
/// </summary>
|
||||
public class Position
|
||||
{
|
||||
/// <summary>
|
||||
/// The longitude.
|
||||
/// </summary>
|
||||
public double Longitude { get; set; }
|
||||
/// <summary>
|
||||
/// The latitude.
|
||||
/// </summary>
|
||||
public double Latitude { get; set; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,42 +0,0 @@
|
|||
//
|
||||
// PositionAndKeyphrase.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;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Position and keyphrase.
|
||||
/// </summary>
|
||||
public class PositionAndKeyphrase {
|
||||
/// <summary>
|
||||
/// The phrase.
|
||||
/// </summary>
|
||||
public string phrase;
|
||||
/// <summary>
|
||||
/// The position.
|
||||
/// </summary>
|
||||
public Position pos;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,40 +0,0 @@
|
|||
//
|
||||
// ProvidedEvent.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;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Provided event.
|
||||
/// </summary>
|
||||
public class ProvidedEvent : YaEvent {
|
||||
/// <summary>
|
||||
/// The privacy.
|
||||
/// </summary>
|
||||
[Required]
|
||||
public Publishing Privacy;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
//
|
||||
// ProviderPublicInfo.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;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Provider public info.
|
||||
/// </summary>
|
||||
public class ProviderPublicInfo {
|
||||
/// <summary>
|
||||
/// Gets or sets the display name.
|
||||
/// </summary>
|
||||
/// <value>The display name.</value>
|
||||
[Required]
|
||||
public string DisplayName { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the location.
|
||||
/// </summary>
|
||||
/// <value>The type of the location.</value>
|
||||
[Required]
|
||||
public string LocationType { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the location.
|
||||
/// </summary>
|
||||
/// <value>The location.</value>
|
||||
[Required]
|
||||
public Position Location { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the logo image locator.
|
||||
/// </summary>
|
||||
/// <value>The logo image locator.</value>
|
||||
public string LogoImgLocator { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the description.
|
||||
/// </summary>
|
||||
/// <value>The description.</value>
|
||||
[Required]
|
||||
public string Description { get; set;}
|
||||
/// <summary>
|
||||
/// Gets or sets the web page.
|
||||
/// </summary>
|
||||
/// <value>The web page.</value>
|
||||
public string WebPage { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the calendar.
|
||||
/// </summary>
|
||||
/// <value>The calendar.</value>
|
||||
public Schedule Calendar { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
//
|
||||
// Publishing.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;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Publishing.
|
||||
/// </summary>
|
||||
public enum Publishing {
|
||||
/// <summary>
|
||||
/// The private.
|
||||
/// </summary>
|
||||
Private,
|
||||
/// <summary>
|
||||
/// The public.
|
||||
/// </summary>
|
||||
Public
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
//
|
||||
// Schedule.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;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Schedule.
|
||||
/// </summary>
|
||||
public class Schedule {
|
||||
/// <summary>
|
||||
/// Gets or sets the period.
|
||||
/// </summary>
|
||||
/// <value>The period.</value>
|
||||
public Periodicity Period { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the schedule of an open week.
|
||||
/// One item by bay in the week,
|
||||
/// </summary>
|
||||
/// <value>The weekly workdays.</value>
|
||||
public OpenDay [] WeekDays { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the hollydays.
|
||||
/// </summary>
|
||||
/// <value>The hollydays.</value>
|
||||
[Required]
|
||||
public Period [] Validity { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
//
|
||||
// UserPrefs.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;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
class UserPrefs
|
||||
{
|
||||
Circle [] Circles { get; set ; }
|
||||
Dictionary<string,double> EventTypeRatings { get; set; }
|
||||
Dictionary<string,double> LocationTypeRatings { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
//
|
||||
// WeekDay.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;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Week day.
|
||||
/// </summary>
|
||||
public enum WeekDay:int {
|
||||
/// <summary>
|
||||
/// The monday (0).
|
||||
/// </summary>
|
||||
Monday=0,
|
||||
/// <summary>
|
||||
/// The tuesday.
|
||||
/// </summary>
|
||||
Tuesday,
|
||||
/// <summary>
|
||||
/// The wednesday.
|
||||
/// </summary>
|
||||
Wednesday,
|
||||
/// <summary>
|
||||
/// The thursday.
|
||||
/// </summary>
|
||||
Thursday,
|
||||
/// <summary>
|
||||
/// The friday.
|
||||
/// </summary>
|
||||
Friday,
|
||||
/// <summary>
|
||||
/// The saturday.
|
||||
/// </summary>
|
||||
Saturday,
|
||||
/// <summary>
|
||||
/// The sunday.
|
||||
/// </summary>
|
||||
Sunday
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,96 +0,0 @@
|
|||
//
|
||||
// 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;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Model;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// NF event.
|
||||
/// </summary>
|
||||
public class YaEvent
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The title.
|
||||
/// </summary>
|
||||
[Required(ErrorMessage="Please, choose a .")]
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="Title")]
|
||||
public string Title { get; set; }
|
||||
/// <summary>
|
||||
/// The description.
|
||||
/// </summary>
|
||||
[Required(ErrorMessage="Please, choose a Description.")]
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="Description")]
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
/// The location.
|
||||
/// </summary>
|
||||
[Required(ErrorMessage="Please, choose a Location.")]
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="Location")]
|
||||
public Position Location { get; set; }
|
||||
/// <summary>
|
||||
/// The start date.
|
||||
/// </summary>
|
||||
[Required(ErrorMessage="Please, choose a Start Date.")]
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="StartDate")]
|
||||
public DateTime StartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the end date.
|
||||
/// </summary>
|
||||
/// <value>The end date.</value>
|
||||
[Required(ErrorMessage="Please, choose an End Date.")]
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="EndDate")]
|
||||
public DateTime EndDate { get; set; }
|
||||
/// <summary>
|
||||
/// The name of the NF provider.
|
||||
/// </summary>
|
||||
[Required(ErrorMessage="Please, choose a Provider Name.")]
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="ProviderName")]
|
||||
public string ProviderName { get; set; }
|
||||
/// <summary>
|
||||
/// The NF provider identifier.
|
||||
/// </summary>
|
||||
[Required(ErrorMessage="Please, choose a Provider Identifier.")]
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="ProviderId")]
|
||||
public string ProviderId { get; set; }
|
||||
/// <summary>
|
||||
/// The promotion code.
|
||||
/// </summary>
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="Comment")]
|
||||
public string Comment { get; set; }
|
||||
/// <summary>
|
||||
/// The event web page.
|
||||
/// </summary>
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="EventWebPage")]
|
||||
public string EventWebPage { get; set; }
|
||||
/// <summary>
|
||||
/// The image locator.
|
||||
/// </summary>
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="ImgLocator")]
|
||||
public string ImgLocator { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -20,17 +20,15 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Yavsc.ApiControllers.Calendar.Model;
|
||||
using Yavsc.Helpers;
|
||||
using System.ComponentModel;
|
||||
using Yavsc.Model;
|
||||
using Yavsc.Model.RolesAndMembers;
|
||||
using System.Web.Security;
|
||||
using System.Web.Profile;
|
||||
using System.Web.Http.ModelBinding;
|
||||
using Yavsc.Model.Google;
|
||||
using Yavsc.Helpers;
|
||||
using System.Web.Profile;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar
|
||||
|
||||
namespace Yavsc.ApiControllers
|
||||
{
|
||||
/// <summary>
|
||||
/// Night flash controller.
|
||||
|
|
@ -139,42 +137,7 @@ namespace Yavsc.ApiControllers.Calendar
|
|||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// GCM register model.
|
||||
/// </summary>
|
||||
public class GCMRegisterModel {
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the user.
|
||||
/// </summary>
|
||||
/// <value>The name of the user.</value>
|
||||
[Localizable(true)]
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="UserName")]
|
||||
[Required(ErrorMessage = "S'il vous plait, entrez un nom d'utilisateur")]
|
||||
public string UserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the password.
|
||||
/// </summary>
|
||||
/// <value>The password.</value>
|
||||
[DisplayName("Mot de passe")]
|
||||
[Required(ErrorMessage = "S'il vous plait, entez un mot de passe")]
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the email.
|
||||
/// </summary>
|
||||
/// <value>The email.</value>
|
||||
[DisplayName("Adresse e-mail")]
|
||||
[Required(ErrorMessage = "S'il vous plait, entrez un e-mail valide")]
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the registration identifier against Google Clood Messaging and their info on this application.
|
||||
/// </summary>
|
||||
/// <value>The registration identifier.</value>
|
||||
public string RegistrationId { get; set; }
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Registers with push notifications enabled.
|
||||
Loading…
Add table
Add a link
Reference in a new issue