* CalendarController.cs:
* Web.csproj: * Global.asax.cs: * instdb.sql: * TemplateException.cs: * ValidateAjaxAttribute.cs: * TemplateException.cs: * WorkFlowController.cs: * NFCircle.cs: * Circle.cs: * NFEventPub.cs: * Period.cs: * OpenDay.cs: * NFUserPrefs.cs: * YaEvent.cs: * WeekDay.cs: * Position.cs: * EventPub.cs: * Resources.Designer.cs: * Schedule.cs: * Period.cs: * NFEvent.cs: * EventType.cs: * WeekDay.cs: * OpenDay.cs: * FrontOfficeApiController.cs: * UserPrefs.cs: * Position.cs: * Schedule.cs: * Publishing.cs: * EventType.cs: * Periodicity.cs: * Publishing.cs: * Periodicity.cs: * ProvidedEvent.cs: * ProvidedEvent.cs: * NightFlashController.cs: * EstablishmentType.cs: * ProviderPublicInfo.cs: * EstablishmentType.cs: * PositionAndKeyphrase.cs: * ProviderPublicInfo.cs: * PositionAndKeyphrase.cs: refactoring
This commit is contained in:
parent
4bb83ce552
commit
04304ac0c3
25 changed files with 387 additions and 149 deletions
132
web/ApiControllers/Calendar/CalendarController.cs
Normal file
132
web/ApiControllers/Calendar/CalendarController.cs
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
//
|
||||
// NightFlashController.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;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar
|
||||
{
|
||||
/// <summary>
|
||||
/// Night flash controller.
|
||||
/// </summary>
|
||||
public class CalendarController: ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// List events according the specified search arguments.
|
||||
/// </summary>
|
||||
/// <param name="args">Arguments.</param>
|
||||
[ValidateAjaxAttribute]
|
||||
[HttpGet]
|
||||
public YaEvent[] List ([FromUri] PositionAndKeyphrase args)
|
||||
{
|
||||
return new YaEvent[] {
|
||||
new YaEvent () {
|
||||
Description = "Test Descr",
|
||||
Title = "Night club special bubble party",
|
||||
Location = new Position() {
|
||||
Longitude = 0,
|
||||
Latitude = 0
|
||||
}
|
||||
},
|
||||
new YaEvent () {
|
||||
Title = "Test2",
|
||||
ImgLocator = "http://bla/im.png",
|
||||
Location = new Position() {
|
||||
Longitude = 0,
|
||||
Latitude = 0
|
||||
}
|
||||
},
|
||||
new YaEvent () {
|
||||
Description = "Test Descr",
|
||||
Title = "Night club special bubble party",
|
||||
Location = new Position() {
|
||||
Longitude = 0,
|
||||
Latitude = 0
|
||||
}
|
||||
},
|
||||
new YaEvent () {
|
||||
Title = "Test2",
|
||||
ImgLocator = "http://bla/im.png",
|
||||
Location = new Position() {
|
||||
Longitude = 0,
|
||||
Latitude = 0
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provider the specified ProviderId.
|
||||
/// </summary>
|
||||
/// <param name="ProviderId">Provider identifier.</param>
|
||||
[HttpGet]
|
||||
public ProviderPublicInfo ProviderInfo ([FromUri] string ProviderId)
|
||||
{
|
||||
return new ProviderPublicInfo () {
|
||||
DisplayName = "Yavsc clubing",
|
||||
WebPage = "http://yavsc.pschneider.fr/",
|
||||
Calendar = new Schedule () {
|
||||
Period = Periodicity.ThreeM,
|
||||
WeekDays = new OpenDay[] { new OpenDay () { Day = WeekDay.Saturday,
|
||||
Start = new TimeSpan(18,00,00),
|
||||
End = new TimeSpan(2,00,00)
|
||||
} },
|
||||
Validity = new Period[] { new Period() {
|
||||
Start = new DateTime(2015,5,29),
|
||||
End = new DateTime(2015,5,30)} }
|
||||
},
|
||||
Description = "Yavsc Entertainment Production, Yet another private party",
|
||||
LogoImgLocator = "http://yavsc.pschneider.fr/favicon.png",
|
||||
Location = new Position () { Longitude = 0, Latitude = 0 },
|
||||
LocationType = "Salle des fêtes"
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Posts the image.
|
||||
/// </summary>
|
||||
/// <returns>The image.</returns>
|
||||
/// <param name="NFProvId">NF prov identifier.</param>
|
||||
public string PostImage([FromUri] string NFProvId)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Posts the event.
|
||||
/// </summary>
|
||||
/// <returns>The event identifier.</returns>
|
||||
/// <param name="ev">Ev.</param>
|
||||
public int PostEvent ([FromBody] ProvidedEvent ev)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
void NotifyEvent(EventPub evpub) {
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
35
web/ApiControllers/Calendar/Model/Circle.cs
Normal file
35
web/ApiControllers/Calendar/Model/Circle.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
//
|
||||
// NightFlashController.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
|
||||
{
|
||||
class Circle
|
||||
{
|
||||
public string Title { get; set; }
|
||||
string [] Users { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
62
web/ApiControllers/Calendar/Model/EstablishmentType.cs
Normal file
62
web/ApiControllers/Calendar/Model/EstablishmentType.cs
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
//
|
||||
// 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;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Establishment type.
|
||||
/// </summary>
|
||||
public enum EstablishmentType
|
||||
{
|
||||
/// <summary>
|
||||
/// The discotheque.
|
||||
/// </summary>
|
||||
Discotheque,
|
||||
/// <summary>
|
||||
/// The piano bar.
|
||||
/// </summary>
|
||||
PianoBar,
|
||||
/// <summary>
|
||||
/// The bar.
|
||||
/// </summary>
|
||||
Bar,
|
||||
/// <summary>
|
||||
/// The place publique.
|
||||
/// </summary>
|
||||
PlacePublique,
|
||||
/// <summary>
|
||||
/// The maison privee.
|
||||
/// </summary>
|
||||
MaisonPrivee,
|
||||
/// <summary>
|
||||
/// The domaine publique.
|
||||
/// </summary>
|
||||
DomainePublique,
|
||||
/// <summary>
|
||||
/// The domaine prive.
|
||||
/// </summary>
|
||||
DomainePrive
|
||||
}
|
||||
}
|
||||
35
web/ApiControllers/Calendar/Model/EventPub.cs
Normal file
35
web/ApiControllers/Calendar/Model/EventPub.cs
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
//
|
||||
// NightFlashController.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;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
class EventPub: YaEvent
|
||||
{
|
||||
Circle[] Circles { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
71
web/ApiControllers/Calendar/Model/EventType.cs
Normal file
71
web/ApiControllers/Calendar/Model/EventType.cs
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
//
|
||||
// EventType.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>
|
||||
/// Event type.
|
||||
/// </summary>
|
||||
public enum EventType
|
||||
{
|
||||
/// <summary>
|
||||
/// The concert gratuit.
|
||||
/// </summary>
|
||||
ConcertGratuit,
|
||||
/// <summary>
|
||||
/// The concert prive.
|
||||
/// </summary>
|
||||
ConcertPrive,
|
||||
/// <summary>
|
||||
/// The distraciton.
|
||||
/// </summary>
|
||||
Distraciton,
|
||||
/// <summary>
|
||||
/// The rencontre.
|
||||
/// </summary>
|
||||
Rencontre,
|
||||
/// <summary>
|
||||
/// The assemblee.
|
||||
/// </summary>
|
||||
Assemblee,
|
||||
/// <summary>
|
||||
/// The reunion.
|
||||
/// </summary>
|
||||
Reunion,
|
||||
/// <summary>
|
||||
/// The bureau.
|
||||
/// </summary>
|
||||
Bureau,
|
||||
/// <summary>
|
||||
/// The manifestation.
|
||||
/// </summary>
|
||||
Manifestation,
|
||||
/// <summary>
|
||||
/// The zone de danger.
|
||||
/// </summary>
|
||||
ZoneDeDanger
|
||||
}
|
||||
|
||||
}
|
||||
61
web/ApiControllers/Calendar/Model/OpenDay.cs
Normal file
61
web/ApiControllers/Calendar/Model/OpenDay.cs
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
//
|
||||
// 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; }
|
||||
}
|
||||
|
||||
}
|
||||
46
web/ApiControllers/Calendar/Model/Period.cs
Normal file
46
web/ApiControllers/Calendar/Model/Period.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
//
|
||||
// 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; }
|
||||
}
|
||||
|
||||
}
|
||||
58
web/ApiControllers/Calendar/Model/Periodicity.cs
Normal file
58
web/ApiControllers/Calendar/Model/Periodicity.cs
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
//
|
||||
// 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
|
||||
}
|
||||
|
||||
}
|
||||
44
web/ApiControllers/Calendar/Model/Position.cs
Normal file
44
web/ApiControllers/Calendar/Model/Position.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
//
|
||||
// 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; }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
42
web/ApiControllers/Calendar/Model/PositionAndKeyphrase.cs
Normal file
42
web/ApiControllers/Calendar/Model/PositionAndKeyphrase.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
//
|
||||
// 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;
|
||||
}
|
||||
|
||||
}
|
||||
40
web/ApiControllers/Calendar/Model/ProvidedEvent.cs
Normal file
40
web/ApiControllers/Calendar/Model/ProvidedEvent.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
//
|
||||
// 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;
|
||||
}
|
||||
|
||||
}
|
||||
73
web/ApiControllers/Calendar/Model/ProviderPublicInfo.cs
Normal file
73
web/ApiControllers/Calendar/Model/ProviderPublicInfo.cs
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
//
|
||||
// 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; }
|
||||
}
|
||||
|
||||
}
|
||||
43
web/ApiControllers/Calendar/Model/Publishing.cs
Normal file
43
web/ApiControllers/Calendar/Model/Publishing.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
//
|
||||
// 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
|
||||
}
|
||||
|
||||
}
|
||||
52
web/ApiControllers/Calendar/Model/Schedule.cs
Normal file
52
web/ApiControllers/Calendar/Model/Schedule.cs
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
//
|
||||
// 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; }
|
||||
}
|
||||
|
||||
}
|
||||
34
web/ApiControllers/Calendar/Model/UserPrefs.cs
Normal file
34
web/ApiControllers/Calendar/Model/UserPrefs.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
//
|
||||
// NightFlashController.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> MusicTypeRatings { get; set; }
|
||||
Dictionary<string,double> LocationTypeRatings { get; set; }
|
||||
}
|
||||
}
|
||||
62
web/ApiControllers/Calendar/Model/WeekDay.cs
Normal file
62
web/ApiControllers/Calendar/Model/WeekDay.cs
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
//
|
||||
// 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
|
||||
}
|
||||
|
||||
}
|
||||
101
web/ApiControllers/Calendar/Model/YaEvent.cs
Normal file
101
web/ApiControllers/Calendar/Model/YaEvent.cs
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
//
|
||||
// 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;
|
||||
|
||||
namespace Yavsc.ApiControllers.Calendar.Model
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// NF event.
|
||||
/// </summary>
|
||||
public class YaEvent
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Yavsc.ApiControllers.Calendar.Model.YaEvent"/> class.
|
||||
/// </summary>
|
||||
public YaEvent()
|
||||
{
|
||||
this.EstabType = EstablishmentType.DomainePublique;
|
||||
this.NFEvType = EventType.Distraciton;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the NF ev.
|
||||
/// </summary>
|
||||
/// <value>The type of the NF ev.</value>
|
||||
[Required]
|
||||
public EventType NFEvType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the estab.
|
||||
/// </summary>
|
||||
/// <value>The type of the estab.</value>
|
||||
[Required(ErrorMessage="Please, choose an establisment type.")]
|
||||
public EstablishmentType EstabType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The title.
|
||||
/// </summary>
|
||||
[Required(ErrorMessage="Please, choose a .")]
|
||||
public string Title { get; set; }
|
||||
/// <summary>
|
||||
/// The description.
|
||||
/// </summary>
|
||||
[Required(ErrorMessage="Please, choose a Description.")] public string Description { get; set; }
|
||||
/// <summary>
|
||||
/// The location.
|
||||
/// </summary>
|
||||
[Required(ErrorMessage="Please, choose a Location.")] public Position Location { get; set; }
|
||||
/// <summary>
|
||||
/// The start date.
|
||||
/// </summary>
|
||||
[Required(ErrorMessage="Please, choose a Start Date.")] 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.")] public DateTime EndDate { get; set; }
|
||||
/// <summary>
|
||||
/// The name of the NF provider.
|
||||
/// </summary>
|
||||
[Required(ErrorMessage="Please, choose a Nigth Flash Provider Name.")] public string NFProviderName { get; set; }
|
||||
/// <summary>
|
||||
/// The NF provider identifier.
|
||||
/// </summary>
|
||||
[Required(ErrorMessage="Please, choose a Night Flash Provider Identifier.")] public string NFProviderId { get; set; }
|
||||
/// <summary>
|
||||
/// The promotion code.
|
||||
/// </summary>
|
||||
public string PromotionCode { get; set; }
|
||||
/// <summary>
|
||||
/// The event web page.
|
||||
/// </summary>
|
||||
public string EventWebPage { get; set; }
|
||||
/// <summary>
|
||||
/// The image locator.
|
||||
/// </summary>-
|
||||
public string ImgLocator { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue