using System;
using Altob.NtuInvoiceGateway.Models;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Options;

namespace Altob.NtuInvoiceGateway.Pages;

public class TestPostInvoiceModel : PageModel
{
    public string CompanyTaxId { get; }
    public string CurrentTransDateTime { get; }
    public string CurrentOrderNo { get; }

    public TestPostInvoiceModel(IOptions<CompanyInfo> companyInfo)
    {
        CompanyTaxId = companyInfo.Value.TaxId;
        CurrentTransDateTime = DateTime.Now.ToString("yyyy/MM/dd HH:mm:ss");
        CurrentOrderNo = string.Format($"Order{DateTime.Now:yyyyMMddHHmmss}");
    }

    public void OnGet()
    {
    }
}
