divan/RMuseum/Models/Divan/DivanPoet.cs
Anas Rashid 532d005cdb Rename Ganjoor -> Divan throughout the code
Projects (GanjooRazor -> DivanRazor, GanjoorService.sln -> DivanService.sln), files,
folders, classes, namespaces, settings, API routes (/api/divan) and DB tables (Divan*).
External addresses (ganjoor.net, github.com/ganjoor) unchanged. Migrations renamed
consistently (no pending model changes); requires a fresh database.
Upstream RUNNING_LOCALLY/SEMANTIC_SEARCH docs archived unmodified under docs/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 23:49:01 +02:00

100 lines
2.7 KiB
C#

using RSecurityBackend.Models.Image;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace RMuseum.Models.Divan
{
/// <summary>
/// Divan Poet
/// </summary>
/// <remarks>
/// cat_id field is removed, it is retrievable by querying <see cref="DivanCat"/>
/// where <see cref="DivanCat.PoetId"/> == <see cref="Id"/> and
/// <see cref="DivanCat.Parent"/> == null
/// </remarks>
public class DivanPoet
{
/// <summary>
/// id
/// </summary>
[Key, DatabaseGenerated(DatabaseGeneratedOption.None)]
public int Id { get; set; }
/// <summary>
/// name
/// </summary>
public string Name { get; set; }
/// <summary>
/// description
/// </summary>
public string Description { get; set; }
/// <summary>
/// short name
/// </summary>
public string Nickname { get; set; }
/// <summary>
/// poet image
/// </summary>
public virtual RImage RImage { get; set; }
/// <summary>
/// user image id
/// </summary>
public Guid? RImageId { get; set; }
/// <summary>
/// published on website
/// </summary>
public bool Published { get; set; }
/// <summary>
/// birth year in lunar hijri
/// </summary>
public int BirthYearInLHijri { get; set; }
/// <summary>
/// death year in lunar hijri
/// </summary>
public int DeathYearInLHijri { get; set; }
/// <summary>
/// Home page pin order (zero means not pinned)
/// </summary>
public int PinOrder { get; set; }
/// <summary>
/// BirthYearInLHijri, for some poets it is only indicator of their century of birth and should not be relied as their valid birth date
/// </summary>
public bool ValidBirthDate { get; set; }
/// <summary>
/// DeathYearInLHijri, for some poets it is only indicator of their century of death and should not be relied as their valid death date
/// </summary>
public bool ValidDeathDate { get; set; }
/// <summary>
/// birth location id
/// </summary>
public int? BirthLocationId { get; set; }
/// <summary>
/// birth location
/// </summary>
public virtual DivanGeoLocation BirthLocation { get; set; }
/// <summary>
/// death location id
/// </summary>
public int? DeathLocationId { get; set; }
/// <summary>
/// death location
/// </summary>
public virtual DivanGeoLocation DeathLocation { get; set; }
}
}