VideoGoodsAuthor.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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_author}}".
  13. *
  14. * @property int $id
  15. * @property int $store_id
  16. * @property int $user_id 用户id
  17. * @property int $is_delete 是否删除
  18. * @property int $is_show 是否禁用
  19. * @property int $status 状态
  20. * @property int $created_at 创建时间
  21. * @property int $updated_at 更新时间
  22. * @property int $card_type 证件类型
  23. * @property string $card_front 身份证正面
  24. * @property string $card_before 身份证反面
  25. * @property string $name 姓名
  26. * @property string $mobile 手机号
  27. * @property string $desc 申请理由
  28. */
  29. class VideoGoodsAuthor extends \yii\db\ActiveRecord
  30. {
  31. /**
  32. * {@inheritdoc}
  33. */
  34. public static function tableName()
  35. {
  36. return '{{%video_goods_author}}';
  37. }
  38. public function behaviors()
  39. {
  40. return [
  41. [
  42. 'class' => TimestampBehavior::class,
  43. 'attributes' => [
  44. ActiveRecord::EVENT_BEFORE_INSERT => ['updated_at', 'created_at'],
  45. ActiveRecord::EVENT_BEFORE_UPDATE => 'updated_at'
  46. ]
  47. ]
  48. ];
  49. }
  50. /**
  51. * {@inheritdoc}
  52. */
  53. public function rules()
  54. {
  55. return [
  56. [['store_id', 'user_id', 'is_delete', 'status', 'is_show', 'created_at', 'updated_at', 'card_type'], 'integer'],
  57. [['card_front', 'card_before', 'name', 'mobile', 'desc'], 'string']
  58. ];
  59. }
  60. }