| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- using Microsoft.AspNetCore.Mvc;
- using Microsoft.EntityFrameworkCore;
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.DataAnnotations.Schema;
- namespace bitforum.Models
- {
- [Table("Config")]
- [Index(nameof(Key), IsUnique = true)]
- public class Config
- {
- [Key]
- public int ID { get; set; }
- [Required]
- public string Key { get; set; }
- public string? Value { get; set; }
- public string? Description { get; set; }
- public DateTime CreatedAt { get; set; } = DateTime.Now;
- }
- // 기본 정보
- public class BasicForm
- {
- [Display(Name = "사이트 이름")]
- [BindProperty(Name = "site_name")]
- public string? SiteName { get; set; } = null;
- [Display(Name = "최고 관리자")]
- [BindProperty(Name = "root_id")]
- public string? RootID { get; set; } = null;
- [Display(Name = "송수신 이메일")]
- [BindProperty(Name = "from_email")]
- public string? FromEmail { get; set; } = null;
- [Display(Name = "송수신자 이름")]
- [BindProperty(Name = "from_email_name")]
- public string? FromEmailName { get; set; } = null;
- [Display(Name = "SMTP Server")]
- [BindProperty(Name = "smtp_server")]
- public string? SmtpServer { get; set; } = null;
- [Display(Name = "SMTP Port")]
- [BindProperty(Name = "smtp_port")]
- public string? SmtpPort { get; set; } = null;
- [Display(Name = "SMTP From Email")]
- [BindProperty(Name = "smtp_from_email")]
- public string? SmtpFromEmail { get; set; } = null;
- [Display(Name = "SMTP Email Password")]
- [BindProperty(Name = "smtp_email_password")]
- public string? SmtpEmailPassword { get; set; } = null;
- [Display(Name = "관리자단 접근 가능 IP")]
- [BindProperty(Name = "admin_white_ip_list")]
- public string? AdminWhiteIPList { get; set; } = null;
- [Display(Name = "사용자단 접근 가능 IP")]
- [BindProperty(Name = "front_white_ip_list")]
- public string? FrontWhiteIPList { get; set; } = null;
- [Display(Name = "차단 시 안내문 제목")]
- [BindProperty(Name = "block_alert_title")]
- public string? BlockAlertTitle { get; set; } = null;
- [Display(Name = "차단 시 안내문 내용")]
- [BindProperty(Name = "block_alert_content")]
- public string? BlockAlertContent { get; set; } = null;
- [Display(Name = "점검 여부")]
- [BindProperty(Name = "is_maintenance")]
- [RegularExpression("^[01]$", ErrorMessage = "점검 여부는 0 또는 1이어야 합니다.")]
- public char IsMaintenance { get; set; } = '0';
- [Display(Name = "점검 내용")]
- [BindProperty(Name = "maintenance_content")]
- public string? MaintenanceContent { get; set; } = null;
- }
- // 메타 태그
- public class MetaForm
- {
- [Display(Name = "Meta Keywords")]
- [BindProperty(Name = "meta_keywords")]
- public string? MetaKeyword { get; set; } = null;
- [Display(Name = "Meta Description")]
- [BindProperty(Name = "meta_description")]
- public string? MetaDescription { get; set; } = null;
- [Display(Name = "Meta Author")]
- [BindProperty(Name = "meta_author")]
- public string? MetaAuthor { get; set; } = null;
- [Display(Name = "Meta Viewport")]
- [BindProperty(Name = "meta_viewport")]
- public string? MetaViewport { get; set; } = null;
- [Display(Name = "Meta Application Name")]
- [BindProperty(Name = "meta_application_name")]
- public string? MetaApplicationName { get; set; } = null;
- [Display(Name = "Meta Generator")]
- [BindProperty(Name = "meta_generator")]
- public string? MetaGenerator { get; set; } = null;
- [Display(Name = "Meta Robots")]
- [BindProperty(Name = "meta_robots")]
- public string? MetaRobots { get; set; } = null;
- [Display(Name = "Meta Adds")]
- [BindProperty(Name = "meta_adds")]
- public string? MetaAdds { get; set; } = null;
- }
- // 회사 정보
- public class CompanyForm
- {
- [Display(Name = "상호 명")]
- [BindProperty(Name = "company_name")]
- public string? CompanyName { get; set; } = null;
- [Display(Name = "사업자 등록 번호")]
- [BindProperty(Name = "company_reg_no")]
- public string? CompanyRegNo { get; set; } = null;
- [Display(Name = "대표자 명")]
- [BindProperty(Name = "company_owner")]
- public string? CompanyOwner { get; set; } = null;
- [Display(Name = "대표 전화번호")]
- [BindProperty(Name = "company_tel")]
- public string? CompanyTel { get; set; } = null;
- [Display(Name = "FAX 번호")]
- [BindProperty(Name = "company_fax")]
- public string? CompanyFax { get; set; } = null;
- [Display(Name = "통신판매업 신고번호")]
- [BindProperty(Name = "company_retail_sale_no")]
- public string? CompanyRetailSaleNo { get; set; } = null;
- [Display(Name = "부가통신 사업자번호")]
- [BindProperty(Name = "company_added_sale_no")]
- public string? CompanyAddedSaleNo { get; set; } = null;
- [Display(Name = "사업장 주소")]
- [BindProperty(Name = "company_zip_code")]
- public string? CompanyZipCode { get; set; } = null;
- [Display(Name = "호스팅 서비스")]
- [BindProperty(Name = "company_hosting")]
- public string? CompanyHosting { get; set; } = null;
- [Display(Name = "정보관리책임자")]
- [BindProperty(Name = "company_admin_name")]
- public string? CompanyAdminName { get; set; } = null;
- [Display(Name = "정보관리책임자 E-mail")]
- [BindProperty(Name = "company_admin_email")]
- public string? CompanyAdminEmail { get; set; } = null;
- [Display(Name = "사이트 주소")]
- [BindProperty(Name = "company_site_url")]
- public string? CompanySiteURL { get; set; } = null;
- [Display(Name = "입금 계좌")]
- [BindProperty(Name = "company_bank_code")]
- public int? CompanyBankCode { get; set; }
- [Display(Name = "예금주")]
- [BindProperty(Name = "company_bank_owner")]
- public string? CompanyBankOwner { get; set; } = null;
- [Display(Name = "계좌번호")]
- [BindProperty(Name = "company_bank_number")]
- public string? CompanyBankNumber { get; set; } = null;
- }
- }
|