server-master/srcs/_plugins/Plugin.DB.EF/Bazaar/DbBazaarItemEntity.cs
2026-02-10 18:21:30 +01:00

48 lines
No EOL
1.2 KiB
C#

// WingsEmu
//
// Developed by NosWings Team
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using PhoenixLib.DAL.EFCore.PGSQL;
using Plugin.Database.DB;
using Plugin.Database.Entities;
using Plugin.Database.Entities.PlayersData;
using WingsEmu.DTOs.Items;
namespace Plugin.Database.Bazaar
{
[Table("items", Schema = DatabaseSchemas.BAZAAR)]
public class DbBazaarItemEntity : BaseAuditableEntity, ILongEntity
{
public long CharacterId { get; set; }
public int Amount { get; set; }
public int SoldAmount { get; set; }
public long PricePerItem { get; set; }
public long SaleFee { get; set; }
public bool IsPackage { get; set; }
public bool UsedMedal { get; set; }
public DateTime ExpiryDate { get; set; }
public short DayExpiryAmount { get; set; }
[Column(TypeName = "jsonb")]
public ItemInstanceDTO ItemInstance { get; set; }
[ForeignKey(nameof(CharacterId))]
public virtual DbCharacter DbCharacter { get; set; }
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; }
}
}