import { Expose, Type } from 'class-transformer';
import { BannerEntity } from './BannerEntity';
import "reflect-metadata";
import { WxVideoConfigEntity } from './WxVideoConfig';

export class ConfigEntity {
  @Expose({ name: 'client.guide.pay.enable' })
  guidePayEnable: boolean = true; //引导页是否开启支付，默认可以

  @Expose({ name: 'client.guide.enable' })
  guideEnable: boolean = true; //是否开启引导页

  @Expose({ name: 'client.start.function.hint' })
  guideHint: string = ""; //引导页提示语

  @Expose({ name: 'client.nologin.pay.enable' })
  noLoginPayEnable: boolean = false; //是否开启未登录支付

  @Expose({ name: 'client.pay.agreement' })
  payAgreementEnable: boolean = true; //是否显示支付协议

  @Expose({ name: 'client.login.type' })
  loginType: Array<string> = new Array(); //支持的登录类型

  @Expose({ name: 'client.banner.urls' })
  @Type(() => BannerEntity)
  homeBanners: Array<BannerEntity> = new Array(); //首页轮播图

  @Expose({ name: 'client.wechat.video.share.enable' })
  wxVideoEnable: boolean = true; //视频号开关

  @Expose({ name: 'client.wechat.video.playback.share.enable' })
  playbackEnable: boolean = true; //

  @Expose({ name: 'client.course.urlplay' })
  takeMaterialCourse: string = ""; //链接提取教程链接

  @Expose({ name: 'client.course.sphplay' })
  wxVideoCourse: string = ""; //视频号教程

  @Expose({ name: 'client.course.zbhfplay' })
  wxPlaybackCourse: string = ""; //直播回放教程

  @Expose({ name: 'client.playback.join.type' })
  wxPlaybackJoinType: string = ""; //直播加群方式

  @Type(() => WxVideoConfigEntity)
  @Expose({ name: 'client.mp.share.config.scmf' })
  wxVideoConfig: WxVideoConfigEntity = new WxVideoConfigEntity() //直播回放小程序跳转配置

  @Expose({ name: 'client.hmos.video.service.enable' }) //视频号助手是否可用
  wxVideoServiceEnable: boolean = true

  @Expose({ name: 'client.link.collection' })
  domainMap: Record<string, string> = {}; //网站主机名

  @Expose({ name: 'client.copy.contains' })
  copyContainsList: Array<string> = []; //链接识别配置

  @Expose({ name: 'client.challenge.enable' })
  challengeEnable?: boolean = true; //0元挑战
}