refactoring
This commit is contained in:
parent
5cc77545dd
commit
fa85a5a1a6
46 changed files with 3130 additions and 553 deletions
|
|
@ -1,9 +0,0 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Models.Calendar
|
||||
{
|
||||
public class Availability: List<Period>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
//
|
||||
// ICalendarManager.cs
|
||||
// IScheduledEvent.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paul@pschneider.fr>
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 GNU GPL
|
||||
// Copyright (c) 2015 - 2017 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
|
||||
|
|
@ -19,28 +19,16 @@
|
|||
// 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.Calendar
|
||||
{
|
||||
using Models.Workflow;
|
||||
using Models.Messaging;
|
||||
/// <summary>
|
||||
/// I calendar manager.
|
||||
/// </summary>
|
||||
public interface ICalendarManager {
|
||||
public interface IScheduledEvent
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the free dates.
|
||||
/// Gets or sets the period.
|
||||
/// </summary>
|
||||
/// <returns>The free dates.</returns>
|
||||
/// <param name="username">Username.</param>
|
||||
/// <param name="req">Req.</param>
|
||||
IFreeDateSet GetFreeDates(string username, RdvQuery req);
|
||||
/// <summary>
|
||||
/// Book the specified username and ev.
|
||||
/// </summary>
|
||||
/// <param name="username">Username.</param>
|
||||
/// <param name="ev">Ev.</param>
|
||||
bool Book(string username, YaEvent ev);
|
||||
}
|
||||
}
|
||||
/// <value>The period.</value>
|
||||
Periodicity Reccurence { get; set; }
|
||||
Period Period { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 Paul Schneider
|
||||
// Copyright (c) 2015 - 2017 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
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 Paul Schneider
|
||||
// Copyright (c) 2015 - 2017 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
|
||||
|
|
|
|||
|
|
@ -19,32 +19,46 @@
|
|||
// 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/>.
|
||||
|
||||
//
|
||||
// Calendar.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 - 2017 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;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Calendar
|
||||
{
|
||||
/// <summary>
|
||||
/// Schedule.
|
||||
/// Le calendrier, l'emploi du temps.
|
||||
/// </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; }
|
||||
[Key,Required]
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
[ForeignKey("OwnerId")]
|
||||
[Display(Name="Professionnel")]
|
||||
public virtual ApplicationUser Owner { get ; set; }
|
||||
|
||||
public ScheduledEvent [] Events { get ; set; }
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
45
Yavsc/Models/Calendar/ScheduledEvent.cs
Normal file
45
Yavsc/Models/Calendar/ScheduledEvent.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
//
|
||||
// ScheduledEvent.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 - 2017 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;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Calendar
|
||||
{
|
||||
public class ScheduledEvent : IScheduledEvent
|
||||
{
|
||||
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
public Period Period
|
||||
{
|
||||
get;
|
||||
|
||||
set;
|
||||
}
|
||||
|
||||
public Periodicity Reccurence
|
||||
{
|
||||
get;
|
||||
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +1,24 @@
|
|||
//
|
||||
// Connection.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 - 2017 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;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,24 @@
|
|||
//
|
||||
// Color.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 - 2017 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;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,26 @@
|
|||
|
||||
//
|
||||
// IDocument.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 - 2017 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;
|
||||
|
||||
namespace Yavsc.Models {
|
||||
|
||||
|
|
@ -6,6 +28,8 @@ namespace Yavsc.Models {
|
|||
public string Name { get; set; }
|
||||
public string Value { get; set; }
|
||||
}
|
||||
|
||||
[Obsolete("Templates are ala Razor")]
|
||||
public interface IDocument {
|
||||
string Template { get; set; }
|
||||
Parameter [] Parameters { get; set; }
|
||||
|
|
|
|||
|
|
@ -1,3 +1,26 @@
|
|||
|
||||
//
|
||||
// FileRecievedInfo.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 - 2017 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/>.
|
||||
|
||||
|
||||
namespace Yavsc.Models.FileSystem
|
||||
{
|
||||
public class FileRecievedInfo
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
// 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.Google
|
||||
namespace Yavsc.Models.Google.Calendar
|
||||
{
|
||||
/// <summary>
|
||||
/// Calendar list.
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
// 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.Google
|
||||
namespace Yavsc.Models.Google.Calendar
|
||||
{
|
||||
/// <summary>
|
||||
/// Calendar list entry.
|
||||
|
|
@ -105,17 +105,6 @@ namespace Yavsc.Models.Google
|
|||
/// <summary>
|
||||
/// Reminder.
|
||||
/// </summary>
|
||||
public class Reminder {
|
||||
/// <summary>
|
||||
/// Gets or sets the method.
|
||||
/// </summary>
|
||||
/// <value>The method.</value>
|
||||
public string method { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the minutes.
|
||||
/// </summary>
|
||||
/// <value>The minutes.</value>
|
||||
public int minutes { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
15
Yavsc/Models/Google/Calendar/Reminder.cs
Normal file
15
Yavsc/Models/Google/Calendar/Reminder.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
namespace Yavsc.Models.Google.Calendar
|
||||
{
|
||||
public class Reminder {
|
||||
/// <summary>
|
||||
/// Gets or sets the method.
|
||||
/// </summary>
|
||||
/// <value>The method.</value>
|
||||
public string method { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the minutes.
|
||||
/// </summary>
|
||||
/// <value>The minutes.</value>
|
||||
public int minutes { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -1,3 +1,25 @@
|
|||
|
||||
//
|
||||
// BrusherProfile.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 - 2017 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;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
|
|
@ -36,9 +58,9 @@ namespace Yavsc.Models.Haircut
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
|
||||
[DisplayFormat(ConvertEmptyStringToNull = true, NullDisplayText = "[Pas de lieu spécifié]")]
|
||||
[Display(Name="Disponibilités")]
|
||||
public virtual Availability Availability { get; set; }
|
||||
[DisplayFormat(ConvertEmptyStringToNull = true, NullDisplayText = "[Pas d'emploi du temps spécifié]")]
|
||||
[Display(Name="Emploi du temps")]
|
||||
public virtual Schedule Schedule { get; set; }
|
||||
|
||||
[Display(Name="Coupe femme cheveux longs"),DisplayFormat(DataFormatString="{0:C}")]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,25 @@
|
|||
|
||||
//
|
||||
// HaircutQueryInfo.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 - 2017 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.ComponentModel.DataAnnotations;
|
||||
using Yavsc.Models.Auth;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue