Two things:
* User views its devices, from a /manage index link * Yavsc.Server resurection
This commit is contained in:
22
Yavsc.Server/Models/Relationship/Circle.cs
Normal file
22
Yavsc.Server/Models/Relationship/Circle.cs
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
public class Circle {
|
||||
[Key, DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
|
||||
public string Name { get; set; }
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
[ForeignKey("OwnerId"),JsonIgnore,NotMapped]
|
||||
public virtual ApplicationUser Owner { get; set; }
|
||||
|
||||
[InverseProperty("Circle"),JsonIgnore]
|
||||
public virtual List<CircleMember> Members { get; set; }
|
||||
}
|
||||
}
|
22
Yavsc.Server/Models/Relationship/CircleMember.cs
Normal file
22
Yavsc.Server/Models/Relationship/CircleMember.cs
Normal file
@ -0,0 +1,22 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
|
||||
public partial class CircleMember
|
||||
{
|
||||
|
||||
[Required]
|
||||
public long CircleId { get; set; }
|
||||
|
||||
[ForeignKey("CircleId")]
|
||||
public virtual Circle Circle { get; set; }
|
||||
[Required]
|
||||
public string MemberId { get; set; }
|
||||
|
||||
[ForeignKey("MemberId")]
|
||||
public virtual ApplicationUser Member { get; set; }
|
||||
}
|
||||
}
|
21
Yavsc.Server/Models/Relationship/Contact.cs
Normal file
21
Yavsc.Server/Models/Relationship/Contact.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
public class Contact
|
||||
{
|
||||
[Required()]
|
||||
public string UserId { get; set; }
|
||||
|
||||
[Required()]
|
||||
public string OwnerId { get; set; }
|
||||
|
||||
[ForeignKeyAttribute("OwnerId"),NotMapped]
|
||||
public virtual ApplicationUser Owner { get; set; }
|
||||
|
||||
[ForeignKeyAttribute("UserId"),NotMapped]
|
||||
public virtual ApplicationUser User { get; set; }
|
||||
}
|
||||
}
|
20
Yavsc.Server/Models/Relationship/HyperLink.cs
Normal file
20
Yavsc.Server/Models/Relationship/HyperLink.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
public class HyperLink
|
||||
{
|
||||
[Display(Name="Hyper référence")]
|
||||
public string HRef { get; set; }
|
||||
|
||||
[Display(Name="Methode Http attendue coté serveur")]
|
||||
public string Method { get; set; }
|
||||
|
||||
[Display(Name="Classe de lien")]
|
||||
public string Rel { get; set; }
|
||||
|
||||
[Display(Name="Type mime du contenu attendu côté client")]
|
||||
public string ContentType { get; set; }
|
||||
|
||||
}
|
||||
}
|
38
Yavsc.Server/Models/Relationship/Location.cs
Normal file
38
Yavsc.Server/Models/Relationship/Location.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Position.
|
||||
/// </summary>
|
||||
public class Position: IPosition
|
||||
{
|
||||
/// <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, ILocation {
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
[Required(),
|
||||
Display(Name="Address"),
|
||||
MaxLength(512)]
|
||||
public string Address { get; set; }
|
||||
}
|
||||
}
|
14
Yavsc.Server/Models/Relationship/LocationType.cs
Normal file
14
Yavsc.Server/Models/Relationship/LocationType.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
public enum LocationKind
|
||||
{
|
||||
|
||||
PostalAddress,
|
||||
LocationName,
|
||||
City
|
||||
|
||||
}
|
||||
}
|
14
Yavsc.Server/Models/Relationship/PostalAddress.cs
Normal file
14
Yavsc.Server/Models/Relationship/PostalAddress.cs
Normal file
@ -0,0 +1,14 @@
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
public class PostalAddress
|
||||
{
|
||||
public string Street1 { get; set; }
|
||||
public string Street2 { get; set; }
|
||||
public string PostalCode { get; set; }
|
||||
public string City { get; set; }
|
||||
public string State { get; set; }
|
||||
public string Province { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
10
Yavsc.Server/Models/Relationship/Relation.cs
Normal file
10
Yavsc.Server/Models/Relationship/Relation.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
public class Relation<TDescription>
|
||||
{
|
||||
public RelationKind Kind { get; set; }
|
||||
|
||||
TDescription Description { get; set; }
|
||||
|
||||
}
|
||||
}
|
19
Yavsc.Server/Models/Relationship/ReletionKind.cs
Normal file
19
Yavsc.Server/Models/Relationship/ReletionKind.cs
Normal file
@ -0,0 +1,19 @@
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
public enum RelationKind
|
||||
{
|
||||
Css,
|
||||
Favicon,
|
||||
WebPage,
|
||||
Video,
|
||||
Image,
|
||||
Audio,
|
||||
EmailAddress,
|
||||
Position,
|
||||
PostalAddress,
|
||||
Work,
|
||||
Business,
|
||||
Friend,
|
||||
Family
|
||||
}
|
||||
}
|
14
Yavsc.Server/Models/Relationship/Tag.cs
Normal file
14
Yavsc.Server/Models/Relationship/Tag.cs
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Yavsc.Models.Relationship
|
||||
{
|
||||
public class Tag
|
||||
{
|
||||
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public long Id { get; set; }
|
||||
[Required()]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user