using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AipGateway.API.Domain.Entities
{
    [Table("TB_LINKED_SERVER")]
    public class TbLinkedServer
    {
        [Key]
        [DatabaseGeneratedAttribute(DatabaseGeneratedOption.Identity)]
        public required int ServerId { get; set; }
        public required int SystemId { get; set; }

        [StringLength(30)]
        public required string ServerIpAddr { get; set; }
        
        [StringLength(255)]
        public required string ServerDesc { get; set; }
        public required DateTime CreatedAt { get; set; }
        public required bool UseYn { get; set; }

        public DateTime? DeletedAt { get; set; }

        public override string ToString()
        {
            return "TbLinkedServer{ ServerId: " + ServerId + ", SystemId: " + SystemId + ", ServerIpAddr: " + ServerIpAddr + ", ServerDesc: " + ServerDesc + ", CreatedAt: " + CreatedAt + "}";
        }
    }
}
