using System;
using System.Collections.Generic;
using rockfishCore.Util;


namespace rockfishCore.Models
{
    /*
    exec("CREATE TABLE trialrequest (" +
                "id INTEGER PRIMARY KEY, dbid text not null, companyname text not null, contactname text not null, notes text, email text not null, " +
                "emailvalidated boolean default 0 NOT NULL CHECK (emailvalidated IN (0,1)), dtrequested integer, " +
                "dtprocessed integer, status integer default 0 not null, rejectreason text, key text, dtfetched integer" +
                ")");
    */


    public partial class TrialRequest
    {
        public enum TrialRequestStatus
        {
            NotSet = 0,
            Approved = 1,
            Rejected = 2
        }
        public TrialRequest()
        {
            DtRequested = DateUtil.NowAsEpoch();
            EmailValidated = false;
            Status = TrialRequestStatus.NotSet;
            EmailConfirmCode = "?";
        }
        public long Id { get; set; }
        public Guid DbId { get; set; }
        public string CompanyName { get; set; }
        public string ContactName { get; set; }
        public string Notes { get; set; }
        public string Email { get; set; }
        public string EmailConfirmCode { get; set; }
        public bool EmailValidated { get; set; }
        public long? DtRequested { get; set; }
        public long? DtProcessed { get; set; }
        public TrialRequestStatus Status { get; set; }// status enum 0=notset, 1=approved, 2=rejected
        public string RejectReason { get; set; }
        public string Key { get; set; }
        public long? DtFetched { get; set; }
    }
}
