MdGroupDriverOrder.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * MdGroupDriverOrder.php
  4. * todo 文件描述
  5. * Created on 2024/4/9 10:22
  6. * @author: hankaige
  7. */
  8. namespace app\models;
  9. use yii\behaviors\TimestampBehavior;
  10. use yii\db\ActiveRecord;
  11. /**
  12. * This is the model class for table "{{%md_group_activities_order}}".
  13. * @property integer $id
  14. * @property integer $activities_id
  15. * @property integer $order_id
  16. * @property integer $status
  17. * @property integer $created_at
  18. * @property integer $updated_at
  19. */
  20. class MdGroupDriverOrder extends \yii\db\ActiveRecord
  21. {
  22. public static function tableName()
  23. {
  24. return "{{%md_group_activities_order}}";
  25. }
  26. public function behaviors()
  27. {
  28. return [
  29. [
  30. 'class' => TimestampBehavior::class,
  31. 'attributes' => [
  32. ActiveRecord::EVENT_BEFORE_INSERT => ['created_at'],
  33. ActiveRecord::EVENT_BEFORE_UPDATE => ['updated_at']
  34. ]
  35. ]
  36. ];
  37. }
  38. public function rules()
  39. {
  40. return [
  41. [['activities_id','order_id'],'required'],
  42. [['activities_id','order_id','status'],'integer'],
  43. ['status','default','value'=>0]
  44. ];
  45. }
  46. public function attributeLabels()
  47. {
  48. return [
  49. 'activities_id'=>'活动ID',
  50. 'order_id'=>'订单ID',
  51. 'status'=>'状态'
  52. ];
  53. }
  54. }