yavsc/src/Yavsc.Server/Models/Payment/PaypalPayment.cs

52 lines
1.3 KiB
C#
Raw Normal View History

2017-05-07 22:12:04 +02:00
using System;
2017-05-15 13:36:14 +02:00
using System.Collections.Generic;
2017-05-07 22:12:04 +02:00
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace Yavsc.Models.Payment {
2017-05-27 16:22:58 +02:00
using Yavsc;
2017-05-15 13:36:14 +02:00
using Relationship;
2019-09-04 01:25:36 +01:00
using Yavsc.Attributes.Validation;
2017-05-07 22:12:04 +02:00
2024-12-14 20:21:41 +00:00
public class PayPalPayment : ITrackedEntity
2017-05-07 22:12:04 +02:00
{
2019-09-04 01:25:36 +01:00
[YaRequired,Key]
2017-05-24 23:36:49 +02:00
public string CreationToken { get; set; }
2017-05-12 12:15:57 +02:00
2019-09-04 01:25:36 +01:00
[YaRequired]
2017-05-12 12:15:57 +02:00
public string ExecutorId { get; set; }
2017-05-07 22:12:04 +02:00
[ForeignKey("ExecutorId")]
public virtual ApplicationUser Executor { get; set; }
2017-05-12 12:15:57 +02:00
public string PaypalPayerId { get; set; }
public string OrderReference { get; set; }
2017-05-07 22:12:04 +02:00
[Display(Name="Date de création")]
public DateTime DateCreated
{
get; set;
}
[Display(Name="Createur")]
public string UserCreated
{
get; set;
}
[Display(Name="Date de dernière modification")]
public DateTime DateModified
{
get; set;
}
[Display(Name="Utilisateur ayant modifié le dernier")]
public string UserModified
{
get; set;
}
2017-05-15 13:36:14 +02:00
public string State { get; set; }
2017-05-07 22:12:04 +02:00
public bool IsOk() { return State == "SUCCESS"; }
2017-06-01 12:03:57 +02:00
public virtual List<HyperLink> Links { get; set; }
2017-05-15 13:36:14 +02:00
}
}