import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';

/**
 * 站点信息实体
 * 对应数据库表：site
 */
@Entity('site')
export class Site {
  @PrimaryGeneratedColumn({ name: 'site_id' })
  site_id: number;

  // 添加缺失的字段以匹配 PHP 项目
  @PrimaryGeneratedColumn({ name: 'id' })
  id: number;

  @Column({ name: 'site_title', type: 'varchar', length: 255, default: '' })
  site_title: string;

  @Column({ name: 'site_keywords', type: 'varchar', length: 255, default: '' })
  site_keywords: string;

  @Column({ name: 'site_description', type: 'text', nullable: true })
  site_description: string;

  @Column({ name: 'site_logo', type: 'varchar', length: 255, default: '' })
  site_logo: string;

  @Column({ name: 'site_favicon', type: 'varchar', length: 255, default: '' })
  site_favicon: string;

  @Column({ name: 'icp_number', type: 'varchar', length: 255, default: '' })
  icp_number: string;

  @Column({ name: 'copyright', type: 'varchar', length: 255, default: '' })
  copyright: string;

  @Column({ name: 'site_status', type: 'tinyint', default: 1 })
  site_status: number;

  @Column({ name: 'close_reason', type: 'varchar', length: 255, default: '' })
  close_reason: string;

  @Column({ name: 'site_name', type: 'varchar', length: 50, default: '' })
  site_name: string;

  @Column({ name: 'group_id', type: 'int', default: 0 })
  group_id: number;

  @Column({ name: 'keywords', type: 'varchar', length: 255, default: '' })
  keywords: string;

  @Column({ name: 'app_type', type: 'varchar', length: 50, default: 'admin' })
  app_type: string;

  @Column({ name: 'logo', type: 'varchar', length: 255, default: '' })
  logo: string;

  @Column({ name: 'desc', type: 'varchar', length: 255, default: '' })
  desc: string;

  @Column({ name: 'status', type: 'tinyint', default: 1 })
  status: number;

  @Column({ name: 'latitude', type: 'varchar', length: 255, default: '' })
  latitude: string;

  @Column({ name: 'longitude', type: 'varchar', length: 255, default: '' })
  longitude: string;

  @Column({ name: 'province_id', type: 'int', default: 0 })
  province_id: number;

  @Column({ name: 'city_id', type: 'int', default: 0 })
  city_id: number;

  @Column({ name: 'district_id', type: 'int', default: 0 })
  district_id: number;

  @Column({ name: 'address', type: 'varchar', length: 255, default: '' })
  address: string;

  @Column({ name: 'full_address', type: 'varchar', length: 255, default: '' })
  full_address: string;

  @Column({ name: 'phone', type: 'varchar', length: 255, default: '' })
  phone: string;

  @Column({ name: 'business_hours', type: 'varchar', length: 255, default: '' })
  business_hours: string;

  @Column({ name: 'create_time', type: 'int', default: 0 })
  create_time: number;

  @Column({ name: 'expire_time', type: 'bigint', default: 0 })
  expire_time: number;

  @Column({ name: 'front_end_name', type: 'varchar', length: 50, default: '' })
  front_end_name: string;

  @Column({ name: 'front_end_logo', type: 'varchar', length: 255, default: '' })
  front_end_logo: string;

  @Column({ name: 'front_end_icon', type: 'varchar', length: 255, default: '' })
  front_end_icon: string;

  @Column({ name: 'icon', type: 'varchar', length: 255, default: '' })
  icon: string;

  @Column({ name: 'member_no', type: 'varchar', length: 255, default: '0' })
  member_no: string;

  @Column({ name: 'app', type: 'text' })
  app: string;

  @Column({ name: 'addons', type: 'text' })
  addons: string;

  @Column({ name: 'initalled_addon', type: 'text', nullable: true })
  initalled_addon: string;

  @Column({ name: 'site_domain', type: 'varchar', length: 255, default: '' })
  site_domain: string;

  @Column({ name: 'meta_title', type: 'varchar', length: 255, default: '' })
  meta_title: string;

  @Column({ name: 'meta_desc', type: 'varchar', length: 255, default: '' })
  meta_desc: string;

  @Column({ name: 'meta_keyword', type: 'varchar', length: 255, default: '' })
  meta_keyword: string;
}