VideoGoodsSetting.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <?php
  2. /**
  3. * 厦门云联储网络科技有限公司
  4. * https://www.baokuaiyun.com
  5. * Copyright (c) 2023 爆块云 All rights reserved.
  6. */
  7. namespace app\models;
  8. use yii\db\ActiveRecord;
  9. use yii\behaviors\TimestampBehavior;
  10. use Yii;
  11. /**
  12. * This is the model class for table "{{%video_goods_setting}}".
  13. *
  14. * @property int $id
  15. * @property int $store_id
  16. * @property int $is_video_audit 是否开启视频审核
  17. * @property int $is_author_audit 是否开启作者审核
  18. * @property int $profit 分红
  19. * @property int created_at 创建时间
  20. * @property int updated_at 更新时间
  21. * @property string verify 客户端申请条件
  22. */
  23. class VideoGoodsSetting extends \yii\db\ActiveRecord
  24. {
  25. /**
  26. * {@inheritdoc}
  27. */
  28. public static function tableName()
  29. {
  30. return '{{%video_goods_setting}}';
  31. }
  32. public function behaviors()
  33. {
  34. return [
  35. [
  36. 'class' => TimestampBehavior::class,
  37. 'attributes' => [
  38. ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
  39. ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
  40. ]
  41. ]
  42. ];
  43. }
  44. /**
  45. * {@inheritdoc}
  46. */
  47. public function rules()
  48. {
  49. return [
  50. [['store_id', 'is_video_audit', 'is_author_audit', 'created_at', 'updated_at'], 'integer'],
  51. [['profit'], 'number'],
  52. [['verify'], 'string']
  53. ];
  54. }
  55. }