Re-fabrication
This commit is contained in:
parent
f155a47073
commit
cb6309abdb
499 changed files with 7574 additions and 12530 deletions
34
Yavsc.Server/Models/Messaging/Announce.cs
Normal file
34
Yavsc.Server/Models/Messaging/Announce.cs
Normal 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}";
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue