API
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PropertyCampaignItem.cs 843B

1234567891011121314151617181920212223242526272829
  1. using System.Collections.Generic;
  2. using System.ComponentModel.DataAnnotations.Schema;
  3. using UnivateProperties_API.Model.Properties;
  4. namespace UnivateProperties_API.Model.Campaigns
  5. {
  6. public class PropertyCampaignItem : BaseEntity
  7. {
  8. [ForeignKey("Campaign")]
  9. public int CampaignId { get; set; }
  10. [ForeignKey("Property")]
  11. public int PropertyId { get; set; }
  12. public string Image { get; set; }
  13. public virtual Property Property { get; set; }
  14. public virtual Campaign Campaign { get; set; }
  15. public virtual ICollection<CampaignItemPlaceHolder> CampaignItemPlaceHolder { get; set; }
  16. [NotMapped]
  17. public string Reference
  18. {
  19. get
  20. {
  21. return Property != null ? Property.PropertyRef : "";
  22. }
  23. }
  24. }
  25. }