sépare le modèle client du serveur, et crée par la même la librairie Yavsc.Api

This commit is contained in:
2016-06-15 17:24:37 +02:00
parent 7632de1673
commit 95c694b5e2
198 changed files with 10623 additions and 1836 deletions

View File

@ -0,0 +1,36 @@
//
// IIdentified.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/>.
namespace Yavsc.Interfaces
{
/// <summary>
/// I identified.
/// </summary>
public interface IIdentified<T>
{
/// <summary>
/// Gets or sets the identifier.
/// </summary>
/// <value>The identifier.</value>
T Id { get; set; }
}
}

View File

@ -0,0 +1,28 @@
//
// INominative.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/>.
namespace Yavsc.Interfaces
{
public interface IPerformerSpecified {
string PerformerName { get; set; }
}
}

View File

@ -0,0 +1,36 @@
//
// IIdentified.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/>.
namespace Yavsc.Interfaces
{
/// <summary>
/// I rating.
/// </summary>
public interface IRating: IIdentified<long>
{
/// <summary>
/// Gets or sets the rate.
/// </summary>
/// <value>The rate.</value>
int Rate { get; set; }
}
}

View File

@ -0,0 +1,28 @@
//
// ITitle.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/>.
namespace Yavsc.Interfaces
{
public interface ITitle
{
string Title { get; set; }
}
}

View File

@ -0,0 +1,50 @@
//
// 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/>.
namespace Yavsc.Models.Access
{
/// <summary>
/// Publishing.
/// </summary>
public enum Publishing {
/// <summary>
/// In the context of immediate use, with no related stored content.
/// </summary>
None,
/// <summary>
/// In the context of private use of an uploaded content.
/// </summary>
Private,
/// <summary>
/// In the context of restricted access areas, like circle members views.
/// </summary>
Restricted,
/// <summary>
/// Publishing a content in a public access area.
/// </summary>
Public
}
}

View File

@ -0,0 +1,10 @@
namespace Yavsc.Models.Auth
{
public enum ApplicationTypes: int
{
JavaScript = 0,
NativeConfidential = 1
};
}

View File

@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Auth
{
public class Client
{
[Key]
public string Id { get; set; }
public string DisplayName { get; set; }
public string RedirectUri { get; set; }
[MaxLength(100)]
public string LogoutRedirectUri { get; set; }
public string Secret { get; set; }
public ApplicationTypes Type { get; set; }
public bool Active { get; set; }
public int RefreshTokenLifeTime { get; set; }
}
}

View File

@ -0,0 +1,33 @@
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Auth {
public class ExternalLoginViewModel
{
public string Name { get; set; }
public string Url { get; set; }
public string State { get; set; }
}
public class RegisterExternalBindingModel
{
[Required]
public string UserName { get; set; }
[Required]
public string Provider { get; set; }
[Required]
public string ExternalAccessToken { get; set; }
}
public class ParsedExternalAccessToken
{
public string user_id { get; set; }
public string app_id { get; set; }
}
}

View File

@ -0,0 +1,48 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.OAuth
{
/// <summary>
/// OffLine OAuth2 Token
/// To use against a third party Api
/// </summary>
public partial class OAuth2Tokens
{
/// <summary>
/// Unique identifier, equals the user email from OAuth provider
/// </summary>
/// <returns></returns>
[Key]
public string UserId { get; set; }
/// <summary>
/// Expiration date &amp; time
/// </summary>
/// <returns></returns>
public DateTime Expiration { get; set; }
/// <summary>
/// Expiration time span in seconds
/// </summary>
/// <returns></returns>
public string ExpiresIn { get; set; }
/// <summary>
/// Should always be <c>Bearer</c> ...
/// </summary>
/// <returns></returns>
public string TokenType { get; set; }
/// <summary>
/// The Access Token!
/// </summary>
/// <returns></returns>
public string AccessToken { get; set; }
/// <summary>
/// The refresh token
/// </summary>
/// <returns></returns>
public string RefreshToken { get; set; }
}
}

View File

@ -0,0 +1,23 @@
using System;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Auth
{
public class RefreshToken
{
[Key]
public string Id { get; set; }
[Required]
[MaxLength(50)]
public string Subject { get; set; }
[Required]
[MaxLength(50)]
public string ClientId { get; set; }
public DateTime IssuedUtc { get; set; }
public DateTime ExpiresUtc { get; set; }
[Required]
public string ProtectedTicket { get; set; }
}
}

View File

@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Auth {
public class Scope {
[Key]
public string Id { get; set; }
public string Description { get; set; }
}
}

View File

@ -0,0 +1,22 @@
using Yavsc.Models.OAuth;
namespace Yavsc.Models.Auth {
public class UserCredential {
public string UserId { get; set; }
public OAuth2Tokens Tokens { get; set; }
public UserCredential(string userId, OAuth2Tokens tokens)
{
UserId = userId;
Tokens = tokens;
}
public string GetHeader()
{
return Tokens.TokenType+" "+Tokens.AccessToken;
}
}
}

View File

@ -0,0 +1,21 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models
{
public partial class AccountBalance {
[Key]
public string UserId { get; set; }
[ForeignKey("UserId")]
public virtual ApplicationUser Owner { get; set; }
[Required,Display(Name="Credits in €")]
public decimal Credits { get; set; }
public long ContactCredits { get; set; }
}
}

View File

@ -0,0 +1,26 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models
{
public partial class BalanceImpact {
[Required,Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Required,Display(Name="Impact")]
public decimal Impact { get; set; }
[Required,Display(Name="Execution date")]
public DateTime ExecDate { get; set; }
[Required,Display(Name="Reason")]
public string Reason { get; set; }
[Required]
public string BalanceId { get; set; }
[ForeignKey("BalanceId")]
public virtual AccountBalance Balance { get; set; }
}
}

View File

@ -0,0 +1,9 @@
using Yavsc.Models.Market;
namespace Yavsc.Models.Billing
{
public class Command<P> where P:BaseProduct {
}
}

View File

@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Market;
namespace Yavsc.Models.Billing
{
public class CommandLine {
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public string Comment { get; set; }
public BaseProduct Article { get; set; }
public int Count { get; set; }
public decimal UnitaryCost { get; set; }
}
}

View File

@ -0,0 +1,52 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using Yavsc.Models.Booking;
namespace Yavsc.Models.Billing
{
public partial class RDVEstimate
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public long? CommandId { get; set; }
/// <summary>
/// A command is not required to create
/// an estimate,
/// it will result in a new estimate template
/// </summary>
/// <returns></returns>
[ForeignKey("CommandId")]
public BookQuery Query { get; set; }
public string Description { get; set; }
public int? Status { get; set; }
public string Title { get; set; }
public List<CommandLine> Bill { get; set; }
/// <summary>
/// List of attached graphic files
/// to this estimate, as relative pathes to
/// the command performer's root path.
/// In db, they are separated by <c>:</c>
/// </summary>
/// <returns></returns>
[NotMapped]
public List<string> AttachedGraphics { get; set; }
public string AttachedGraphicsString { get { return string.Join(":", AttachedGraphics); }
set { AttachedGraphics = value.Split(':').ToList(); } }
/// <summary>
/// List of attached files
/// to this estimate, as relative pathes to
/// the command performer's root path.
/// In db, they are separated by <c>:</c>
/// </summary>
/// <returns></returns>
[NotMapped]
public List<string> AttachedFiles { get; set; }
public string AttachedFilesString { get { return string.Join(":", AttachedFiles); }
set { AttachedFiles = value.Split(':').ToList(); } }
}
}

View File

@ -0,0 +1,10 @@
using System;
namespace Yavsc.Models.Billing
{
public partial class EstimateAgreement : RDVEstimate
{
public DateTime ClientValidationDate { get; set; }
}
}

View File

@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Market;
using Yavsc.Models.Workflow;
namespace Yavsc.Models.Billing
{
public class NominativeServiceCommand : Command<Service> {
public string ClientId { get; set; }
/// <summary>
/// The client
/// </summary>
[Required,ForeignKey("ClientId")]
public ApplicationUser Client { get; set; }
[Required]
public string PerformerId { get; set; }
/// <summary>
/// The performer identifier
/// </summary>
[ForeignKey("PerformerId")]
public PerformerProfile PerformerProfile { get; set; }
public DateTime? ValidationDate {get; set;}
/// <summary>
/// Command creation Date & time
/// </summary>
/// <returns></returns>
public DateTime CreationDate {get; set;}
public decimal? Previsional { get; set; }
/// <summary>
/// The bill
/// </summary>
/// <returns></returns>
public List<CommandLine> Bill { get; set; }
///<summary>
/// Time span in seconds in which
/// Validation will be considered as definitive
///</summary>
public int Lag { get; set; }
}
}

View File

@ -0,0 +1,5 @@
class ChatBilling { 
}

View File

@ -0,0 +1,14 @@
using System;
namespace Yavsc.Models.Billing
{
public partial class histoestim
{
public long _id { get; set; }
public string applicationname { get; set; }
public DateTime datechange { get; set; }
public long estid { get; set; }
public int? status { get; set; }
public string username { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Billing
{
public partial class satisfaction
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long _id { get; set; }
public string comnt { get; set; }
public int? rate { get; set; }
[ForeignKey("Skill.Id")]
public long? userskillid { get; set; }
}
}

View File

@ -0,0 +1,13 @@
namespace Yavsc.Models.Billing
{
public partial class writtings
{
public long _id { get; set; }
public int? count { get; set; }
public string description { get; set; }
public long estimid { get; set; }
public string productid { get; set; }
public decimal? ucost { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace Yavsc.Models.Billing
{
public partial class wrtags
{
public long wrid { get; set; }
public long tagid { get; set; }
}
}

View File

@ -0,0 +1,25 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models
{
public partial class Blog
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public string bcontent { get; set; }
[DisplayAttribute(Name="Modified")]
public DateTime modified { get; set; }
public string photo { get; set; }
public DateTime posted { get; set; }
public int rate { get; set; }
public string title { get; set; }
[Required]
public string AuthorId { get; set; }
[ForeignKey("AuthorId")]
public ApplicationUser Author { set; get; }
public bool visible { get; set; }
}
}

View File

@ -0,0 +1,15 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models
{
public partial class BlogAccess
{
[ForeignKey("Blog.Id")]
public long PostId { get; set; }
[ForeignKey("Circle.Id")]
public long CircleId { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using System.Collections.Generic;
namespace Yavsc.Models
{ 
public interface IBlogspotRepository
{
void Add(Blog item);
IEnumerable<Blog> GetAll();
Blog Find(string key);
Blog Remove(string key);
void Update(Blog item);
}
}

View File

@ -0,0 +1,16 @@
using System;
namespace Yavsc.Models
{
public partial class comment
{
public long _id { get; set; }
public string applicationname { get; set; }
public string bcontent { get; set; }
public DateTime modified { get; set; }
public DateTime posted { get; set; }
public long? postid { get; set; }
public string username { get; set; }
public bool visible { get; set; }
}
}

View File

@ -0,0 +1,32 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Billing;
namespace Yavsc.Models.Booking
{
/// <summary>
/// Query, for a date, with a given perfomer, at this given place.
/// </summary>
public class BookQuery : NominativeServiceCommand {
/// <summary>
/// The command identifier
/// </summary>
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id {get; set; }
public DateTime EventDate{get; set; }
public Location Location { get; set; }
public BookQuery()
{
}
public BookQuery(Location eventLocation, DateTime eventDate)
{
Location = eventLocation;
EventDate = eventDate;
}
}
}

View File

@ -0,0 +1,38 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Market;
namespace Yavsc.Models.Booking
{
/// <summary>
/// A date, between two persons
/// </summary>
public class RendezVous: Service {
// Haut les mains.
/// <summary>
/// Event date
/// </summary>
/// <returns></returns>
[Required(),Display(Name="EventDate")]
public DateTime EventDate { get; set; }
/// <summary>
/// Location identifier
/// </summary>
/// <returns></returns>
[Required]
public long LocationId { get; set; }
/// <summary>
/// A Location for this event
/// </summary>
/// <returns></returns>
[Required(ErrorMessage="SpecifyPlace"),Display(Name="Location"),ForeignKey("LocationId")]
public Location Location { get; set; }
}
}

View File

@ -0,0 +1,46 @@
//
// ICalendarManager.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 Yavsc.Models.Booking;
using Yavsc.Models.Messaging;
namespace Yavsc.Models.Calendar
{
/// <summary>
/// I calendar manager.
/// </summary>
public interface ICalendarManager {
/// <summary>
/// Gets the free dates.
/// </summary>
/// <returns>The free dates.</returns>
/// <param name="username">Username.</param>
/// <param name="req">Req.</param>
IFreeDateSet GetFreeDates(string username, BookQuery 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);
}
}

View File

@ -0,0 +1,53 @@
// FreeDate.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.Collections.Generic;
namespace Yavsc.Models.Calendar
{
/// <summary>
/// Free date.
/// </summary>
public interface IFreeDateSet
{
/// <summary>
/// Gets or sets the reference.
/// </summary>
/// <value>The reference.</value>
IEnumerable<Period> Values { get; set; }
/// <summary>
/// Gets or sets the duration.
/// </summary>
/// <value>The duration.</value>
TimeSpan Duration { get; set; }
/// <summary>
/// Gets or sets the attendees.
/// </summary>
/// <value>The attendees.</value>
string UserName { get; set; }
/// <summary>
/// Gets or sets the location.
/// </summary>
/// <value>The location.</value>
string Location { get; set; }
}
}

View File

@ -0,0 +1,60 @@
//
// 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.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Calendar
{
/// <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; }
}
}

View File

@ -0,0 +1,45 @@
//
// 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.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Calendar
{
/// <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; }
}
}

View File

@ -0,0 +1,54 @@
//
// 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/>.
namespace Yavsc.Models.Calendar
{
/// <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
}
}

View File

@ -0,0 +1,40 @@
//
// 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/>.
namespace Yavsc.Models.Calendar
{
/// <summary>
/// Position and keyphrase.
/// </summary>
public class PositionAndKeyphrase {
/// <summary>
/// The phrase.
/// </summary>
public string phrase;
/// <summary>
/// The position.
/// </summary>
public Position pos;
}
}

View 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.ComponentModel.DataAnnotations;
using Yavsc.Models.Messaging;
using Yavsc.Models.Access;
namespace Yavsc.Models.Calendar
{
/// <summary>
/// Provided event.
/// </summary>
public class ProvidedEvent : YaEvent {
/// <summary>
/// The privacy.
/// </summary>
[Required]
public Publishing Privacy;
}
}

View File

@ -0,0 +1,50 @@
//
// 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.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Calendar
{
/// <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; }
}
}

View File

@ -0,0 +1,58 @@
//
// 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/>.
namespace Yavsc.Models.Calendar
{
/// <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
}
}

View File

@ -0,0 +1,13 @@
namespace Yavsc.Models {
public class Parameter {
public string Name { get; set; }
public string Value { get; set; }
}
public interface IDocument {
string Template { get; set; }
Parameter [] Parameters { get; set; }
}
}

View File

@ -0,0 +1,56 @@
//
// GoogleAuthToken.cs
//
// Author:
// Paul Schneider <paulschneider@free.fr>
//
// Copyright (c) 2014 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.Google
{
/// <summary>
/// Auth token, as they are received.
/// </summary>
public class AuthToken {
/// <summary>
/// Gets or sets the access token.
/// </summary>
/// <value>The access token.</value>
public string access_token { get; set; }
/// <summary>
/// Gets or sets the identifier token.
/// </summary>
/// <value>The identifier token.</value>
public string id_token { get; set; }
/// <summary>
/// Gets or sets the type of the token.
/// </summary>
/// <value>The type of the token.</value>
public string token_type { get; set ; }
/// <summary>
/// Gets or sets the refresh token.
/// </summary>
/// <value>The refresh token.</value>
public string refresh_token { get; set; }
/// <summary>
/// Gets or sets the expires in.
/// </summary>
/// <value>The expires in.</value>
public int expires_in { get; set; }
}
}

View File

@ -0,0 +1,43 @@
//
// CalendarEventList.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/>.
namespace Yavsc.Models.Google
{
/// <summary>
/// Calendar event list.
/// </summary>
public class CalendarEventList
{
/// <summary>
/// The next page token.
/// </summary>
public string nextPageToken;
/// <summary>
/// The next sync token.
/// </summary>
public string nextSyncToken;
/// <summary>
/// The items.
/// </summary>
public Resource [] items ;
}
}

View File

@ -0,0 +1,51 @@
//
// CalendarList.cs
//
// Author:
// Paul Schneider <paulschneider@free.fr>
//
// Copyright (c) 2014 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.Google
{
/// <summary>
/// Calendar list.
/// </summary>
public class CalendarList {
/// <summary>
/// Gets or sets the kind.
/// </summary>
/// <value>The kind.</value>
public string kind { get; set;}
/// <summary>
/// Gets or sets the etag.
/// </summary>
/// <value>The etag.</value>
public string etag { get; set; }
/// <summary>
/// Gets or sets the next sync token.
/// </summary>
/// <value>The next sync token.</value>
public string nextSyncToken { get; set; }
/// <summary>
/// Gets or sets the items.
/// </summary>
/// <value>The items.</value>
public CalendarListEntry[] items { get; set; }
}
}

View File

@ -0,0 +1,121 @@
//
// CalendarListEntry.cs
//
// Author:
// Paul Schneider <paulschneider@free.fr>
//
// Copyright (c) 2014 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.Google
{
/// <summary>
/// Calendar list entry.
/// </summary>
public class CalendarListEntry {
/// <summary>
/// Gets or sets the kind.
/// </summary>
/// <value>The kind.</value>
public string kind { get; set;}
/// <summary>
/// Gets or sets the etag.
/// </summary>
/// <value>The etag.</value>
public string etag { get; set; }
/// <summary>
/// Gets or sets the identifier.
/// </summary>
/// <value>The identifier.</value>
public string id { get; set; }
/// <summary>
/// Gets or sets the summary.
/// </summary>
/// <value>The summary.</value>
public string summary { get; set; }
/// <summary>
/// Gets or sets the description.
/// </summary>
/// <value>The description.</value>
public string description { get; set; }
/// <summary>
/// Gets or sets the time zone.
/// </summary>
/// <value>The time zone.</value>
public string timeZone { get; set; }
/// <summary>
/// Gets or sets the color identifier.
/// </summary>
/// <value>The color identifier.</value>
public string colorId { get; set; }
/// <summary>
/// Gets or sets the color of the background.
/// </summary>
/// <value>The color of the background.</value>
public string backgroundColor { get; set; }
/// <summary>
/// Gets or sets the color of the foreground.
/// </summary>
/// <value>The color of the foreground.</value>
public string foregroundColor { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this <see cref="Yavsc.Model.Google.CalendarListEntry"/> is selected.
/// </summary>
/// <value><c>true</c> if selected; otherwise, <c>false</c>.</value>
public bool selected { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this <see cref="Yavsc.Model.Google.CalendarListEntry"/> is primary.
/// </summary>
/// <value><c>true</c> if primary; otherwise, <c>false</c>.</value>
public bool primary { get; set; }
/// <summary>
/// Gets or sets the access role.
/// </summary>
/// <value>The access role.</value>
public string accessRole { get; set; }
/// <summary>
/// Reminder.
/// </summary>
/// <summary>
/// Gets or sets the default reminders.
/// </summary>
/// <value>The default reminders.</value>
public Reminder[] defaultReminders { get; set; }
/* "notificationSettings": { "notifications":
[ { "type": "eventCreation", "method": "email" },
{ "type": "eventChange", "method": "email" },
{ "type": "eventCancellation", "method": "email" },
{ "type": "eventResponse", "method": "email" } ] }, "primary": true },
*/
}
/// <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; }
}
}

View File

@ -0,0 +1,43 @@
//
// GDate.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;
namespace Yavsc.Models.Google
{
/// <summary>
/// G date.
/// </summary>
public class GDate {
/// <summary>
/// The date.
/// </summary>
public DateTime date;
/// <summary>
/// The datetime.
/// </summary>
public DateTime datetime;
/// <summary>
/// The time zone.
/// </summary>
public string timeZone;
}
}

View File

@ -0,0 +1,64 @@
//
// GCMRegisterModel.cs
//
// Author:
// paul <>
//
// Copyright (c) 2015 paul
//
// 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;
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models.Google.Messaging
{
/// <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(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; }
}
}

View File

@ -0,0 +1,78 @@
//
// MessageWithPayLoad.cs
//
// Author:
// paul <>
//
// Copyright (c) 2015 paul
//
// 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 Yavsc.Models.Messaging;
namespace Yavsc.Models.Google.Messaging
{
// https://gcm-http.googleapis.com/gcm/send
/// <summary>
/// Message with payload.
/// </summary>
public class MessageWithPayload<T> {
/// <summary>
/// To.
/// </summary>
public string to;
/// <summary>
/// The registration identifiers.
/// </summary>
public string [] registration_ids;
/// <summary>
/// The data.
/// </summary>
public T data ;
/// <summary>
/// The notification.
/// </summary>
public Notification notification;
/// <summary>
/// The collapse key.
/// </summary>
public string collapse_key; // in order to collapse ...
/// <summary>
/// The priority.
/// </summary>
public int priority; // between 0 and 10, 10 is the lowest!
/// <summary>
/// The content available.
/// </summary>
public bool content_available;
/// <summary>
/// The delay while idle.
/// </summary>
public bool delay_while_idle;
/// <summary>
/// The time to live.
/// </summary>
public int time_to_live; // seconds
/// <summary>
/// The name of the restricted package.
/// </summary>
public string restricted_package_name;
/// <summary>
/// The dry run.
/// </summary>
public bool dry_run;
}
}

View File

@ -0,0 +1,69 @@
//
// MessageWithPayloadResponse.cs
//
// Author:
// paul <paul@pschneider.fr>
//
// Copyright (c) 2015 paul
//
// 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.Google.Messaging
{
// https://gcm-http.googleapis.com/gcm/send
/// <summary>
/// Message with payload response.
/// </summary>
public class MessageWithPayloadResponse {
/// <summary>
/// The multicast identifier.
/// </summary>
public string multicast_id;
/// <summary>
/// The success count.
/// </summary>
public int success;
/// <summary>
/// The failure count.
/// </summary>
public int failure;
/// <summary>
/// The canonical identifiers... ?!?
/// </summary>
public string canonical_ids;
/// <summary>
/// Detailled result.
/// </summary>
public class Result {
/// <summary>
/// The message identifier.
/// </summary>
public string message_id;
/// <summary>
/// The registration identifier.
/// </summary>
public string registration_id;
/// <summary>
/// The error.
/// </summary>
public string error;
}
/// <summary>
/// The results.
/// </summary>
public Result [] results;
}
}

View File

@ -0,0 +1,165 @@
//
// People.cs
//
// Author:
// Paul Schneider <paulschneider@free.fr>
//
// Copyright (c) 2014 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.Google
{
/// <summary>
/// People.
/// </summary>
public class People {
/// <summary>
/// Gets or sets the kind.
/// </summary>
/// <value>The kind.</value>
public string kind { get; set; }
/// <summary>
/// Gets or sets the etag.
/// </summary>
/// <value>The etag.</value>
public string etag { get; set; }
/// <summary>
/// Gets or sets the gender.
/// </summary>
/// <value>The gender.</value>
public string gender { get; set; }
/// <summary>
/// E mail.
/// </summary>
public class EMail{
/// <summary>
/// Gets or sets the value.
/// </summary>
/// <value>The value.</value>
public string value { get; set; }
/// <summary>
/// Gets or sets the type.
/// </summary>
/// <value>The type.</value>
public string type { get; set; }
}
/// <summary>
/// Gets or sets the emails.
/// </summary>
/// <value>The emails.</value>
public EMail[] emails { get; set; }
/// <summary>
/// Gets or sets the type of the object.
/// </summary>
/// <value>The type of the object.</value>
public string objectType { get; set; }
/// <summary>
/// Gets or sets the identifier.
/// </summary>
/// <value>The identifier.</value>
public string id { get; set; }
/// <summary>
/// Gets or sets the display name.
/// </summary>
/// <value>The display name.</value>
public string displayName { get; set; }
/// <summary>
/// Name.
/// </summary>
public class Name {
/// <summary>
/// Gets or sets the name of the family.
/// </summary>
/// <value>The name of the family.</value>
public string familyName { get; set; }
/// <summary>
/// Gets or sets the name of the given.
/// </summary>
/// <value>The name of the given.</value>
public string givenName { get; set; }
}
/// <summary>
/// Gets or sets the name.
/// </summary>
/// <value>The name.</value>
public Name name { get; set;}
/// <summary>
/// Gets or sets the URL.
/// </summary>
/// <value>The URL.</value>
public string url { get; set; }
/// <summary>
/// Image.
/// </summary>
public class Image {
/// <summary>
/// Gets or sets the URL.
/// </summary>
/// <value>The URL.</value>
public string url { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this <see cref="Yavsc.Model.Google.People.Image"/> is default.
/// </summary>
/// <value><c>true</c> if is default; otherwise, <c>false</c>.</value>
public bool isDefault { get; set; }
}
/// <summary>
/// Gets or sets the image.
/// </summary>
/// <value>The image.</value>
public Image image { get; set; }
/// <summary>
/// Place.
/// </summary>
public class Place {
/// <summary>
/// Gets or sets the value.
/// </summary>
/// <value>The value.</value>
public string value { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this <see cref="Yavsc.Model.Google.People.Place"/> is primary.
/// </summary>
/// <value><c>true</c> if primary; otherwise, <c>false</c>.</value>
public bool primary { get; set; }
}
/// <summary>
/// Gets or sets the places lived.
/// </summary>
/// <value>The places lived.</value>
public Place[] placesLived { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this <see cref="Yavsc.Model.Google.People"/> is plus user.
/// </summary>
/// <value><c>true</c> if is plus user; otherwise, <c>false</c>.</value>
public bool isPlusUser { get; set; }
/// <summary>
/// Gets or sets the language.
/// </summary>
/// <value>The language.</value>
public string language { get; set; }
/// <summary>
/// Gets or sets the circled by count.
/// </summary>
/// <value>The circled by count.</value>
public int circledByCount { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this <see cref="Yavsc.Model.Google.People"/> is verified.
/// </summary>
/// <value><c>true</c> if verified; otherwise, <c>false</c>.</value>
public bool verified { get; set; }
}
}

View File

@ -0,0 +1,36 @@
//
// Resource.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/>.
namespace Yavsc.Models.Google
{
/// <summary>
/// Resource.
/// </summary>
public class Resource {
public string id;
public string location;
public string status;
public GDate start;
public GDate end;
public string recurence;
}
}

View File

@ -0,0 +1,47 @@
//
// Entity.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/>.
namespace Yavsc.Models.Google
{
/// <summary>
/// Entity.
/// </summary>
public class Entity
{
/// <summary>
/// The I.
/// </summary>
public string ID;
/// <summary>
/// The name.
/// </summary>
public string Name;
/// <summary>
/// The type: AUTOMOBILE: A car or passenger vehicle.
/// * TRUCK: A truck or cargo vehicle.
/// * WATERCRAFT: A boat or other waterborne vehicle.
/// * PERSON: A person.
/// </summary>
public string Type;
}
}

View File

@ -0,0 +1,37 @@
//
// EntityQuery.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/>.
namespace Yavsc.Models.Google
{
/// <summary>
/// Entity query.
/// </summary>
public class EntityQuery {
/// <summary>
/// The entity identifiers.
/// </summary>
public string [] EntityIds;
/// <summary>
/// The minimum identifier.
/// </summary>
public string MinId;
}
}

View File

@ -0,0 +1,36 @@
using System.Collections.Generic;
using Microsoft.AspNet.Identity.EntityFramework;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models
{
public class ApplicationUser : IdentityUser
{
[Display(Name="AccountBalance")]
public virtual AccountBalance AccountBalance { get; set; }
[InverseProperty("Author")]
public virtual List<Blog> Posts { get; set; }
[InverseProperty("Owner")]
public virtual List<Contact> Book { get; set; }
[InverseProperty("DeviceOwner")]
public virtual List<GoogleCloudMobileDeclaration> Devices { get; set; }
[InverseProperty("Owner")]
public virtual List<Circle> Circles { get; set; }
public virtual Location PostalAddress { get; set; }
public string DedicatedGoogleCalendar { get; set; }
public override string ToString() {
return this.Id+" "+this.AccountBalance?.Credits.ToString()+this.Email+" "+this.UserName+" $"+this.AccountBalance?.Credits.ToString();
}
}
}

View File

@ -0,0 +1,36 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models;
public class GoogleCloudMobileDeclaration {
[Key]
public string RegistrationId { get; set; }
public string DeviceOwnerId { get; set; }
public string Name { get; set; }
[ForeignKeyAttribute("DeviceOwnerId")]
public virtual ApplicationUser DeviceOwner { get; set; }
// override object.Equals
public override bool Equals (object obj)
{
if (obj == null || GetType() != obj.GetType())
{
return false;
}
var other = obj as GoogleCloudMobileDeclaration;
return RegistrationId == other.RegistrationId
&& Name == other.Name;
}
// override object.GetHashCode
public override int GetHashCode()
{
return (RegistrationId+Name).GetHashCode();
}
}

View File

@ -0,0 +1,11 @@
using System;
namespace Yavsc.Models
{
public partial class passwrecovery
{
public string pkid { get; set; }
public DateTime creation { get; set; }
public string one_time_pass { get; set; }
}
}

View File

@ -0,0 +1,30 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Market
{
public partial class BaseProduct
{
/// <summary>
/// An unique product identifier.
/// </summary>
/// <returns></returns>
[Key(),DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public string Name { get; set; }
/// <summary>
/// A contractual description for this product.
/// </summary>
/// <returns></returns>
public string Description { get; set; }
/// <summary>
/// Controls wether this product or service
/// may be offered to clients, or simply
/// are internal workflow entry point.
/// </summary>
/// <returns>true when this product belongs to the public catalog.</returns>
public bool Public { get; set; }
}
}

View File

@ -0,0 +1,10 @@
using System.Collections.Generic;
namespace Yavsc.Models.Market {
public class Catalog {
public List<Product> Products { get; set; }
public List<Service> Services { get; set; }
}
}

View File

@ -0,0 +1,30 @@
namespace Yavsc.Models.Market
{
public partial class Product : BaseProduct
{
/// <summary>
/// Weight in gram
/// </summary>
/// <returns></returns>
public decimal Weight { get; set; }
/// <summary>
/// Height in meter
/// </summary>
/// <returns></returns>
public decimal Height { get; set; }
/// <summary>
/// Width in meter
/// </summary>
/// <returns></returns>
public decimal Width { get; set; }
public decimal Depth { get; set; }
/// <summary>
/// In euro
/// </summary>
/// <returns></returns>
public decimal? Price { get; set; }
}
}

View File

@ -0,0 +1,26 @@
namespace Yavsc.Models.Market {
using System.ComponentModel.DataAnnotations.Schema;
public enum BillingMode { 
Unitary,
SetPrice,
ByExecutionTime
}
public partial class Service : BaseProduct
{
public string ContextId { get; set; }
[ForeignKey("ContextId")]
public virtual Activity Context { get; set; }
public BillingMode? Billing { get; set; }
// TODO public ServiceSpecification Specification { get; set; }
/// <summary>
/// In euro, either by hour or by release
/// </summary>
/// <returns></returns>
public decimal? Pricing { get; set; }
}
}

View 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; }
}
}

View 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; }
}
}

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,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,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; }
/// <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; }
}
}

View File

@ -0,0 +1,21 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models
{
public partial class Circle {
[Key, DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public string Name { get; set; }
public string OwnerId { get; set; }
[ForeignKey("OwnerId")]
public virtual ApplicationUser Owner { get; set; }
[InverseProperty("Circle")]
public virtual List<CircleMember> Members { get; set; }
}
}

View File

@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models
{
public partial class CircleMember
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Required]
public virtual Circle Circle { get; set; }
[Required]
public virtual ApplicationUser Member { get; set; }
}
}

View File

@ -0,0 +1,18 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models
{
public class Contact
{
[Required()]
public string UserId { get; set; }
[Required()]
public string OwnerId { get; set; }
[ForeignKeyAttribute("OwnerId")]
public virtual ApplicationUser Owner { get; set; }
}
}

View File

@ -0,0 +1,38 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc
{
/// <summary>
/// Position.
/// </summary>
public class Position
{
/// <summary>
/// The longitude.
/// </summary>
[Required(),Display(Name="Longitude")]
[Range(-180, 360.0)]
public double Longitude { get; set; }
/// <summary>
///
/// The latitude.
/// </summary>
[Required(),Display(Name="Latitude")]
[Range(-90, 90 )]
public double Latitude { get; set; }
}
public class Location : Position {
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Required(),
Display(Name="Address")]
public string Address { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models
{
public partial class Tag
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[Required()]
public string Name { get; set; }
}
}

View File

@ -0,0 +1,13 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models
{
public partial class Tagged
{
[ForeignKey("Blog.Id")]
public long postid { get; set; }
[ForeignKey("tag.Id")]
public long TagId { get; set; }
}
}

View File

@ -0,0 +1,42 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Market;
namespace Yavsc.Models
{
public class Activity
{
[StringLength(512),Required,Key]
public string Code {get; set;}
/// <summary>
///
/// </summary>
/// <returns></returns>
[StringLength(512),Required()]
public string Name {get; set;}
public string Description {get; set;}
/// <summary>
/// Name to associate to a performer in this activity domain
/// </summary>
/// <returns></returns>
public string ActorDenomination {get; set;}
public string Photo {get; set;}
[InverseProperty("Context")]
public List<Service> Services { get; set; }
/// <summary>
/// Moderation settings
/// </summary>
/// <returns></returns>
string ModeratorGroupName { get; set; }
}
}

View File

@ -0,0 +1,8 @@
namespace Yavsc.Models
{
public interface IRequisition
{
bool Eval();
}
}

View File

@ -0,0 +1,62 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Models.Market;
namespace Yavsc.Models.Workflow
{
public class PerformerProfile {
[Key]
public string PerfomerId { get; set; }
[ForeignKey("PerfomerId"),Display(Name="Performer")]
public virtual ApplicationUser Performer { get; set; }
[Display(Name="Activity"),Required]
public string ActivityCode { get; set; }
public Service Offer { get; set; }
[Required,StringLength(14),Display(Name="SIREN"),
RegularExpression(@"^[0-9]{9,14}$", ErrorMessage = "Only numbers are allowed here")]
public string SIREN { get; set; }
public long OrganisationAddressId { get; set; }
[Required,Display(Name="Organisation address"),ForeignKey("OrganisationAddressId")]
public virtual Location OrganisationAddress { get; set; }
[ForeignKey("ActivityCode"),Display(Name="Activity")]
public virtual Activity Activity { get; set; }
[Display(Name="Accept notifications on client query")]
public bool AcceptNotifications { get; set; }
[Display(Name="Accept notifications from non-VIP users")]
public bool AcceptPublicContact { get; set; }
[Display(Name="Allow my geolocatisation, nearby my clients")]
public bool AcceptGeoLocalisation { get; set; }
[Display(Name="Web site")]
public string WebSite { get; set; }
[Display(Name="Active")]
public bool Active { get; set; }
[Display(Name="Maximal Daily Cost (euro/day)")]
public int? MaxDailyCost { get; set; }
[Display(Name="Minimal Daily Cost (euro/day)")]
public int? MinDailyCost { get; set; }
[Display(Name="Rate from clients")]
public int Rate { get; set; }
[NotMapped]
public bool DoesBlog { get {
return Performer?.Posts != null ? Performer.Posts.Count > 0 : false;
} }
}
}

View File

@ -0,0 +1,9 @@
using System.Threading.Tasks;
namespace Yavsc.Models
{
public abstract class Action<TResult,TInput>
{
public abstract Task<TResult> GetTask(TInput data);
}
}

View File

@ -0,0 +1,16 @@
using System.Collections.Generic;
namespace Yavsc.Models
{
public class Conjonction : List<IRequisition>, IRequisition
{
public bool Eval()
{
foreach (var req in this)
if (!req.Eval())
return false;
return true;
}
}
}

View File

@ -0,0 +1,16 @@
using System.Collections.Generic;
namespace Yavsc.Models
{
public class Disjonction : List<IRequisition>, IRequisition
{
public bool Eval()
{
foreach (var req in this)
if (req.Eval())
return true;
return false;
}
}
}

View File

@ -0,0 +1,12 @@
namespace Yavsc.Models
{
public class ConstInputValue : NamedRequisition
{
public bool Value { get; set; }
public override bool Eval()
{
return Value;
}
}
}

View File

@ -0,0 +1,9 @@
namespace Yavsc.Models
{
public abstract class NamedRequisition : IRequisition
{
public string Name { get; set; }
public abstract bool Eval();
}
}

View File

@ -0,0 +1,16 @@
namespace Yavsc.Models
{
public class Negation<Exp> : IRequisition where Exp : IRequisition
{
Exp _expression;
public Negation(Exp expression)
{
_expression = expression;
}
public bool Eval()
{
return !_expression.Eval();
}
}
}

View File

@ -0,0 +1,34 @@
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Models
{
/// <summary>
/// An abstract, identified rule
/// </summary>
public class Rule<TResult,TInput>
{
[Key]
public string Id { get; set; }
/// <summary>
/// Left part for this rule, a conjonction.
/// All of these requisitions must be true
/// in order to begin any related process.
/// </summary>
/// <returns></returns>
public Conjonction Left { get; set; }
/// <summary>
/// Right part of this rule, a disjonction.
/// That is, only one of these post requisitions
/// has to be true in order for this rule
/// to expose a success.
/// </summary>
/// <returns></returns>
public Disjonction Right { get; set; }
public string Description { get; set; }
public Action<TResult,TInput> Execution { get; set; }
}
}

View File

@ -0,0 +1,17 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models
{
public partial class Projet
{
[Key(),DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[ForeignKeyAttribute("AspNetUsers.Id")]
public string ManagerId { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}
}

View File

@ -0,0 +1,22 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models {
public class Skill {
public string Name { get; set; }
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
/// <summary>
/// indice de recherche de cette capacité
/// rendu par le système.
/// Valide entre 0 et 100,
/// Il démarre à 0.
/// </summary>
public int Rate { get; set; }
}
}

View File

@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models
{
public partial class UserSkills
{
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
[ForeignKeyAttribute("AspNetUsers.Id")]
public string UserId { get; set; }
[ForeignKeyAttribute("Skill.Id")]
public long SkillId { get; set; }
public string Comment { get; set; }
public int Rate { get; set; }
}
}

View File

@ -0,0 +1,10 @@
namespace Yavsc.Models
{
public partial class hr
{
public string userid { get; set; }
public string comment { get; set; }
public decimal rate { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace Yavsc.Models
{
public partial class taskdeps
{
public long taskId { get; set; }
public long deptask { get; set; }
}
}

View File

@ -0,0 +1,14 @@
using System;
namespace Yavsc.Models
{
public partial class tasks
{
public long id { get; set; }
public DateTime endd { get; set; }
public string name { get; set; }
public long prid { get; set; }
public DateTime start { get; set; }
public string tdesc { get; set; }
}
}

View File

@ -0,0 +1,10 @@
namespace Yavsc.Models
{
public partial class wrfiles
{
public long _id { get; set; }
public string name { get; set; }
public long? wrid { get; set; }
}
}

View File

@ -0,0 +1,111 @@
using System.ComponentModel.DataAnnotations;
namespace Yavsc.Model.societe.com
{
public class CompanyInfoMessage
{
public bool success { get; set; }
public string errorType { get; set; }
public string errorCode { get; set; }
public string errorMessage { get; set; }
public CompanyInfo result { get; set; }
}
public class CompanyInfo
{
[Key]
public string registration_number { get; set; }
public string vat_number { get; set; }
public string name { get; set; }
public string commercial_name { get; set; }
public string business_name { get; set; }
public string ape_code { get; set; }
public string ape_label { get; set; }
public string rcs_name { get; set; }
public string greffe_name { get; set; }
public string legal_person_type { get; set; }
public string legal_state { get; set; }
public string legal_type { get; set; }
public string legal_status { get; set; }
public string activity { get; set; }
public string street { get; set; }
public string postal_code { get; set; }
public string country_code { get; set; }
public decimal lng { get; set; }
public decimal lat { get; set; }
public string phone_number { get; set; }
public string capital { get; set; }
public Employee[] contacts { get; set; }
public string[] emails { get; set; }
public Stat[] stats { get; set; }
public MarkDetail[] marks_details { get; set; }
public Bodacc last_bodacc { get; set; }
}
public class MarkDetail
{
public MarkClass[] classes { get; set; }
public Mark[] marks { get; set; }
}
public class MarkClass
{
public string number { get; set; }
public string description { get; set; }
}
public class Mark
{
public string name { get; set; }
public long application_date { get; set; }
}
public class Stat
{
public string type { get; set; }
public int year { get; set; }
public string value { get; set; }
}
public class Bodacc
{
public string type { get; set; }
public string bodacc_type { get; set; }
public long parution_date { get; set; }
public string number { get; set; }
public string rcs_name { get; set; }
public string legal_name { get; set; }
public string legal_status { get; set; }
public string capital { get; set; }
public string administration { get; set; }
public string address { get; set; }
public string description { get; set; }
}
public class Employee
{
[Key]
public string name { get; set; }
public string role { get; set; }
}
}

7
Yavsc.Api/package.json Normal file
View File

@ -0,0 +1,7 @@
{
"name": "Yavsc.Api",
"version": "0.0.0",
"devDependencies": {
"gulp": "^3.9.0"
}
}

23
Yavsc.Api/project.json Normal file
View File

@ -0,0 +1,23 @@
{
"version": "1.0.0-*",
"description": "Api Class Library",
"authors": [ "Class Library template" ],
"tags": [""],
"projectUrl": "",
"licenseUrl": "",
"tooling": {
"defaultNamespace": "Yavsc"
},
"dependencies": {
"EntityFramework.Commands": "7.0.0-rc1-*",
"EntityFramework.Core": "7.0.0-rc1-*",
"EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-*",
"EntityFramework.Relational": "7.0.0-rc1-*",
"EntityFramework7.Npgsql": "3.1.0-*",
"EntityFramework7.Npgsql.Design": "3.1.0-*",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-*"
},
"frameworks": {
"net451": { }
}
}