Re-fabrication

This commit is contained in:
Paul Schneider 2018-03-26 19:27:29 +02:00
commit cb6309abdb
499 changed files with 7574 additions and 12530 deletions

View file

@ -0,0 +1,34 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Yavsc.Interfaces;
namespace Yavsc.Models.Messaging
{
public enum Reason: byte {
Private,
Corporate,
SearchingAPro,
Selling,
Buying,
ServiceProposal
}
public class Announce: BaseEvent, IOwned
{
public Reason For { get; set; }
[Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
public string OwnerId { get; set; }
[ForeignKey("OwnerId")]
public virtual ApplicationUser Owner { get; set; }
public string Message { get; set; }
public override string CreateBody()
{
return $"Annonce de {Owner.UserName}: {For}\n\n{Message}";
}
}
}