Ei kuvausta

SearchConfigGroup.php 26KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
  1. <?php
  2. namespace App\Models;
  3. use Illuminate\Database\Eloquent\Factories\HasFactory;
  4. use Illuminate\Database\Eloquent\Model;
  5. class SearchConfigGroup extends Model
  6. {
  7. protected $table = 'search_config_group';
  8. public $timestamps = false;
  9. protected static $unguarded = true;
  10. public static function getConfigByType($type){
  11. $args = $type."_DEF_CNF";
  12. return self::$$args;
  13. }
  14. public static function getAllColumn($type){
  15. $config = self::getConfigByType($type);
  16. $allColumn = [];
  17. foreach ($config['seting'] as $item){
  18. $allColumn = array_merge($allColumn, array_column($item['list'],'key'));
  19. }
  20. return $allColumn;
  21. }
  22. public static $STAR_VIDEO_TREND_DEF_CNF = [
  23. 'seting' => [
  24. [
  25. 'group_name' => 'default',
  26. 'list' => [
  27. [
  28. 'key' => 'real_amount',
  29. 'name' => '消耗',
  30. 'sort' => 0,
  31. 'hasPercent' => false,
  32. ],
  33. [
  34. 'key' => 'view',
  35. 'name' => '曝光数',
  36. 'sort' => 0,
  37. 'hasPercent' => false,
  38. ],
  39. [
  40. 'key' => 'play',
  41. 'name' => '播放数',
  42. 'sort' => 0,
  43. 'hasPercent' => false,
  44. ],
  45. [
  46. 'key' => 'action',
  47. 'name' => '行为数',
  48. 'sort' => 0,
  49. 'hasPercent' => false,
  50. ],
  51. [
  52. 'key' => 'admire',
  53. 'name' => '点赞数',
  54. 'sort' => 0,
  55. 'hasPercent' => false,
  56. ],
  57. [
  58. 'key' => 'comment',
  59. 'name' => '评论数',
  60. 'sort' => 0,
  61. 'hasPercent' => false,
  62. ],
  63. [
  64. 'key' => 'click',
  65. 'name' => '点击数',
  66. 'sort' => 0,
  67. 'hasPercent' => false,
  68. ],
  69. [
  70. 'key' => 'play_5s',
  71. 'name' => '5s播放数',
  72. 'sort' => 0,
  73. 'hasPercent' => false,
  74. ],
  75. [
  76. 'key' => 'play_end',
  77. 'name' => '完播数',
  78. 'sort' => 0,
  79. 'hasPercent' => false,
  80. ],
  81. [
  82. 'key' => 'item_impression_cnt',
  83. 'name' => '组件曝光',
  84. 'sort' => 0,
  85. 'hasPercent' => false,
  86. ],
  87. [
  88. 'key' => 'item_click_cnt',
  89. 'name' => '组件点击',
  90. 'sort' => 0,
  91. 'hasPercent' => false,
  92. ],
  93. [
  94. 'key' => 'user_cnt',
  95. 'name' => '覆盖用户数',
  96. 'sort' => 0,
  97. 'hasPercent' => false,
  98. ],
  99. [
  100. 'key' => 'click_rate',
  101. 'name' => '点击率',
  102. 'sort' => 0,
  103. 'hasPercent' => true,
  104. ],
  105. [
  106. 'key' => 'play_5s_rate',
  107. 'name' => '5s播放率',
  108. 'sort' => 0,
  109. 'hasPercent' => true,
  110. ],
  111. [
  112. 'key' => 'play_end_rate',
  113. 'name' => '完播率',
  114. 'sort' => 0,
  115. 'hasPercent' => true,
  116. ],
  117. [
  118. 'key' => 'item_click_rate',
  119. 'name' => '组件点击率',
  120. 'sort' => 0,
  121. 'hasPercent' => true,
  122. ]
  123. ],
  124. ],
  125. ],
  126. 'default' => [
  127. 'real_amount', 'view', 'play', 'action', 'admire', 'comment', 'click'
  128. ]
  129. ];
  130. public static $STAR_LIVE_TREND_DEF_CNF = [
  131. 'seting' => [
  132. [
  133. 'group_name' => 'default',
  134. 'list' => [
  135. [
  136. 'key' => 'real_amount',
  137. 'name' => '消耗',
  138. 'sort' => 0,
  139. 'hasPercent' => false,
  140. ],
  141. [
  142. 'key' => 'play_cnt',
  143. 'name' => '播放数',
  144. 'sort' => 0,
  145. 'hasPercent' => false,
  146. ],
  147. [
  148. 'key' => 'play_uv',
  149. 'name' => '播放人数',
  150. 'sort' => 0,
  151. 'hasPercent' => false,
  152. ],
  153. [
  154. 'key' => 'like_cnt',
  155. 'name' => '点赞数',
  156. 'sort' => 0,
  157. 'hasPercent' => false,
  158. ],
  159. [
  160. 'key' => 'comment_cnt',
  161. 'name' => '评论数',
  162. 'sort' => 0,
  163. 'hasPercent' => false,
  164. ],
  165. [
  166. 'key' => 'share_cnt',
  167. 'name' => '分享数',
  168. 'sort' => 0,
  169. 'hasPercent' => false,
  170. ],
  171. [
  172. 'key' => 'live_duration',
  173. 'name' => '直播时长',
  174. 'sort' => 0,
  175. 'hasPercent' => false,
  176. ],
  177. [
  178. 'key' => 'item_show_cnt',
  179. 'name' => '组件曝光',
  180. 'sort' => 0,
  181. 'hasPercent' => false,
  182. ],
  183. [
  184. 'key' => 'item_click_cnt',
  185. 'name' => '组件点击',
  186. 'sort' => 0,
  187. 'hasPercent' => false,
  188. ],
  189. [
  190. 'key' => 'sale_product_cnt',
  191. 'name' => '销售量',
  192. 'sort' => 0,
  193. 'hasPercent' => false,
  194. ],
  195. [
  196. 'key' => 'sale_amount',
  197. 'name' => '销售金额',
  198. 'sort' => 0,
  199. 'hasPercent' => false,
  200. ],
  201. [
  202. 'key' => 'item_click_rate',
  203. 'name' => '组件点击率',
  204. 'sort' => 0,
  205. 'hasPercent' => false,
  206. ]
  207. ],
  208. ],
  209. ],
  210. 'default' => [
  211. 'real_amount', 'play_cnt', 'play_uv', 'like_cnt', 'comment_cnt', 'share_cnt', 'live_duration'
  212. ]
  213. ];
  214. public static $QTASK_VIDEO_TREND_DEF_CNF = [
  215. 'seting' => [
  216. [
  217. 'group_name' => 'default',
  218. 'list' => [
  219. [
  220. 'key' => 'amount',
  221. 'name' => '消耗',
  222. 'sort' => 0,
  223. 'hasPercent' => false,
  224. ],
  225. [
  226. 'key' => 'view',
  227. 'name' => '曝光数',
  228. 'sort' => 0,
  229. 'hasPercent' => false,
  230. ],
  231. [
  232. 'key' => 'play',
  233. 'name' => '播放数',
  234. 'sort' => 0,
  235. 'hasPercent' => false,
  236. ],
  237. [
  238. 'key' => 'action',
  239. 'name' => '行为数',
  240. 'sort' => 0,
  241. 'hasPercent' => false,
  242. ],
  243. [
  244. 'key' => 'admire',
  245. 'name' => '点赞数',
  246. 'sort' => 0,
  247. 'hasPercent' => false,
  248. ],
  249. [
  250. 'key' => 'comment',
  251. 'name' => '评论数',
  252. 'sort' => 0,
  253. 'hasPercent' => false,
  254. ],
  255. [
  256. 'key' => 'click',
  257. 'name' => '点击数',
  258. 'sort' => 0,
  259. 'hasPercent' => false,
  260. ],
  261. [
  262. 'key' => 'play_3s',
  263. 'name' => '3s播放数',
  264. 'sort' => 0,
  265. 'hasPercent' => false,
  266. ],
  267. [
  268. 'key' => 'play_5s',
  269. 'name' => '5s播放数',
  270. 'sort' => 0,
  271. 'hasPercent' => false,
  272. ],
  273. [
  274. 'key' => 'play_end',
  275. 'name' => '完播数',
  276. 'sort' => 0,
  277. 'hasPercent' => false,
  278. ],
  279. [
  280. 'key' => 'item_impression_cnt',
  281. 'name' => '组件曝光',
  282. 'sort' => 0,
  283. 'hasPercent' => false,
  284. ],
  285. [
  286. 'key' => 'item_click_cnt',
  287. 'name' => '组件点击',
  288. 'sort' => 0,
  289. 'hasPercent' => false,
  290. ],
  291. [
  292. 'key' => 'click_rate',
  293. 'name' => '点击率',
  294. 'sort' => 0,
  295. 'hasPercent' => true,
  296. ],
  297. [
  298. 'key' => 'play_3s_rate',
  299. 'name' => '3s播放率',
  300. 'sort' => 0,
  301. 'hasPercent' => true,
  302. ],
  303. [
  304. 'key' => 'play_5s_rate',
  305. 'name' => '5s播放率',
  306. 'sort' => 0,
  307. 'hasPercent' => true,
  308. ],
  309. [
  310. 'key' => 'play_end_rate',
  311. 'name' => '完播率',
  312. 'sort' => 0,
  313. 'hasPercent' => true,
  314. ],
  315. [
  316. 'key' => 'item_click_rate',
  317. 'name' => '组件点击率',
  318. 'sort' => 0,
  319. 'hasPercent' => true,
  320. ]
  321. ],
  322. ],
  323. ],
  324. 'default' => [
  325. 'amount', 'view', 'play', 'action', 'admire', 'comment', 'click'
  326. ]
  327. ];
  328. public static $QTASK_LIVE_TREND_DEF_CNF = [
  329. 'seting' => [
  330. [
  331. 'group_name' => 'default',
  332. 'list' => [
  333. [
  334. 'key' => 'amount',
  335. 'name' => '消耗',
  336. 'sort' => 0,
  337. 'hasPercent' => false,
  338. ],
  339. [
  340. 'key' => 'play_cnt',
  341. 'name' => '播放数',
  342. 'sort' => 0,
  343. 'hasPercent' => false,
  344. ],
  345. [
  346. 'key' => 'play_uv',
  347. 'name' => '播放人数',
  348. 'sort' => 0,
  349. 'hasPercent' => false,
  350. ],
  351. [
  352. 'key' => 'like_cnt',
  353. 'name' => '点赞数',
  354. 'sort' => 0,
  355. 'hasPercent' => false,
  356. ],
  357. [
  358. 'key' => 'comment_cnt',
  359. 'name' => '评论数',
  360. 'sort' => 0,
  361. 'hasPercent' => false,
  362. ],
  363. [
  364. 'key' => 'share_cnt',
  365. 'name' => '分享数',
  366. 'sort' => 0,
  367. 'hasPercent' => false,
  368. ],
  369. [
  370. 'key' => 'live_duration',
  371. 'name' => '直播时长',
  372. 'sort' => 0,
  373. 'hasPercent' => false,
  374. ],
  375. [
  376. 'key' => 'item_show_cnt',
  377. 'name' => '组件曝光',
  378. 'sort' => 0,
  379. 'hasPercent' => false,
  380. ],
  381. [
  382. 'key' => 'item_click_cnt',
  383. 'name' => '组件点击',
  384. 'sort' => 0,
  385. 'hasPercent' => false,
  386. ],
  387. [
  388. 'key' => 'item_click_rate',
  389. 'name' => '组件点击率',
  390. 'sort' => 0,
  391. 'hasPercent' => true,
  392. ]
  393. ],
  394. ],
  395. ],
  396. 'default' => [
  397. 'amount', 'play_cnt', 'play_uv', 'like_cnt', 'comment_cnt', 'share_cnt', 'live_duration'
  398. ]
  399. ];
  400. public static $FLOW_STAR_VIDEO_TREND_DEF_CNF = [
  401. 'seting' => [
  402. [
  403. 'group_name' => 'default',
  404. 'list' => [
  405. [
  406. 'key' => 'consume_amou',
  407. 'name' => '消耗',
  408. 'sort' => 0,
  409. 'hasPercent' => false,
  410. ],
  411. [
  412. 'key' => 'view',
  413. 'name' => '播放数',
  414. 'sort' => 0,
  415. 'hasPercent' => false,
  416. ],
  417. [
  418. 'key' => 'action',
  419. 'name' => '行为数',
  420. 'sort' => 0,
  421. 'hasPercent' => false,
  422. ],
  423. [
  424. 'key' => 'conversion',
  425. 'name' => '激活数',
  426. 'sort' => 0,
  427. 'hasPercent' => false,
  428. ],
  429. [
  430. 'key' => 'admire',
  431. 'name' => '点赞数',
  432. 'sort' => 0,
  433. 'hasPercent' => false,
  434. ],
  435. [
  436. 'key' => 'comment',
  437. 'name' => '评论数',
  438. 'sort' => 0,
  439. 'hasPercent' => false,
  440. ],
  441. [
  442. 'key' => 'played3s_cnt',
  443. 'name' => '3s播放数',
  444. 'sort' => 0,
  445. 'hasPercent' => false,
  446. ],
  447. [
  448. 'key' => 'cash_amount',
  449. 'name' => '现金金额',
  450. 'sort' => 0,
  451. 'hasPercent' => false,
  452. ],
  453. [
  454. 'key' => 'client_amount',
  455. 'name' => '客户返货金额',
  456. 'sort' => 0,
  457. 'hasPercent' => false,
  458. ],
  459. [
  460. 'key' => 'agency_amount',
  461. 'name' => '代理返货金额',
  462. 'sort' => 0,
  463. 'hasPercent' => true,
  464. ],
  465. [
  466. 'key' => 'credit_consume_amount',
  467. 'name' => '授信实际消耗金额',
  468. 'sort' => 0,
  469. 'hasPercent' => false,
  470. ],
  471. [
  472. 'key' => 'play_3s_rate',
  473. 'name' => '3s播放率',
  474. 'sort' => 0,
  475. 'hasPercent' => true,
  476. ],
  477. [
  478. 'key' => 'action_rate',
  479. 'name' => '行为率',
  480. 'sort' => 0,
  481. 'hasPercent' => true,
  482. ],
  483. ],
  484. ],
  485. ],
  486. 'default' => [
  487. 'consume_amount', 'view', 'play', 'action', 'conversion', 'admire', 'comment'
  488. ]
  489. ];
  490. public static $FLOW_STAR_LIVE_TREND_DEF_CNF = [
  491. 'seting' => [
  492. [
  493. 'group_name' => 'default',
  494. 'list' => [
  495. [
  496. 'key' => 'consume_amount',
  497. 'name' => '消耗',
  498. 'sort' => 0,
  499. 'hasPercent' => false,
  500. ],
  501. [
  502. 'key' => 'audience_num',
  503. 'name' => '引入观众数',
  504. 'sort' => 0,
  505. 'hasPercent' => false,
  506. ],
  507. [
  508. 'key' => 'played3s_num',
  509. 'name' => '观看3s+观众数',
  510. 'sort' => 0,
  511. 'hasPercent' => false,
  512. ],
  513. [
  514. 'key' => 'fans_increase_num',
  515. 'name' => '新增粉丝数',
  516. 'sort' => 0,
  517. 'hasPercent' => false,
  518. ],
  519. [
  520. 'key' => 'item_impression_num',
  521. 'name' => '推广直播间曝光数',
  522. 'sort' => 0,
  523. 'hasPercent' => false,
  524. ],
  525. [
  526. 'key' => 'interactive_num',
  527. 'name' => '互动数',
  528. 'sort' => 0,
  529. 'hasPercent' => false,
  530. ],
  531. [
  532. 'key' => 'conversion_impression_num',
  533. 'name' => '组件曝光数',
  534. 'sort' => 0,
  535. 'hasPercent' => false,
  536. ],
  537. [
  538. 'key' => 'conversion_action_num',
  539. 'name' => '行为数',
  540. 'sort' => 0,
  541. 'hasPercent' => false,
  542. ],
  543. [
  544. 'key' => 'cash_amount',
  545. 'name' => '现金金额',
  546. 'sort' => 0,
  547. 'hasPercent' => false,
  548. ],
  549. [
  550. 'key' => 'client_amount',
  551. 'name' => '客户返货金额',
  552. 'sort' => 0,
  553. 'hasPercent' => false,
  554. ],
  555. [
  556. 'key' => 'agency_amount',
  557. 'name' => '代理返货金额',
  558. 'sort' => 0,
  559. 'hasPercent' => false,
  560. ],
  561. [
  562. 'key' => 'credit_consume_amount',
  563. 'name' => '授信实际消耗金额',
  564. 'sort' => 0,
  565. 'hasPercent' => false,
  566. ],
  567. [
  568. 'key' => 'conversion_action_cost',
  569. 'name' => '行为成本',
  570. 'sort' => 0,
  571. 'hasPercent' => false,
  572. ]
  573. ],
  574. ],
  575. ],
  576. 'default' => [
  577. 'consume_amount', 'audience_num', 'fans_increase_num', 'item_impression_num',
  578. 'interactive_num', 'conversion_impression_num', 'conversion_action_num'
  579. ]
  580. ];
  581. public static $FLOW_QTASK_VIDEO_TREND_DEF_CNF = [
  582. 'seting' => [
  583. [
  584. 'group_name' => 'default',
  585. 'list' => [
  586. [
  587. 'key' => 'consume_amount',
  588. 'name' => '消耗',
  589. 'sort' => 0,
  590. 'hasPercent' => false,
  591. ],
  592. [
  593. 'key' => 'view',
  594. 'name' => '曝光数',
  595. 'sort' => 0,
  596. 'hasPercent' => false,
  597. ],
  598. [
  599. 'key' => 'play',
  600. 'name' => '播放数',
  601. 'sort' => 0,
  602. 'hasPercent' => false,
  603. ],
  604. [
  605. 'key' => 'action',
  606. 'name' => '行为数',
  607. 'sort' => 0,
  608. 'hasPercent' => false,
  609. ],
  610. [
  611. 'key' => 'conversion',
  612. 'name' => '激活数',
  613. 'sort' => 0,
  614. 'hasPercent' => false,
  615. ],
  616. [
  617. 'key' => 'admire',
  618. 'name' => '点赞数',
  619. 'sort' => 0,
  620. 'hasPercent' => false,
  621. ],
  622. [
  623. 'key' => 'comment',
  624. 'name' => '评论数',
  625. 'sort' => 0,
  626. 'hasPercent' => false,
  627. ],
  628. [
  629. 'key' => 'played3s_cnt',
  630. 'name' => '3s播放数',
  631. 'sort' => 0,
  632. 'hasPercent' => false,
  633. ],
  634. [
  635. 'key' => 'cash_amount',
  636. 'name' => '现金金额',
  637. 'sort' => 0,
  638. 'hasPercent' => false,
  639. ],
  640. [
  641. 'key' => 'client_amount',
  642. 'name' => '客户返货金额',
  643. 'sort' => 0,
  644. 'hasPercent' => false,
  645. ],
  646. [
  647. 'key' => 'agency_amount',
  648. 'name' => '代理返货金额',
  649. 'sort' => 0,
  650. 'hasPercent' => false,
  651. ],
  652. [
  653. 'key' => 'credit_consume_amount',
  654. 'name' => '授信实际消耗金额',
  655. 'sort' => 0,
  656. 'hasPercent' => false,
  657. ],
  658. [
  659. 'key' => 'play_3s_rate',
  660. 'name' => '3s播放率',
  661. 'sort' => 0,
  662. 'hasPercent' => true,
  663. ],
  664. [
  665. 'key' => 'action_rate',
  666. 'name' => '行为率',
  667. 'sort' => 0,
  668. 'hasPercent' => true,
  669. ]
  670. ],
  671. ],
  672. ],
  673. 'default' => [
  674. 'consume_amount', 'view', 'play', 'action', 'conversion', 'admire', 'comment'
  675. ]
  676. ];
  677. }