You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

64 lines
1.4 KiB

  1. <?php
  2. namespace backend\modules\hotel\models;
  3. use backend\modules\api\models\BaseUser;
  4. use Yii;
  5. /**
  6. * This is the model class for table "invoice_log".
  7. *
  8. * @property integer $ID
  9. * @property integer $CreateUseId
  10. * @property string $CreateTime
  11. * @property string $LogDesc
  12. * @property integer $OrderId
  13. */
  14. class InvoiceLog extends \yii\db\ActiveRecord
  15. {
  16. /**
  17. * @inheritdoc
  18. */
  19. public static function tableName()
  20. {
  21. return 'invoice_log';
  22. }
  23. /**
  24. * @inheritdoc
  25. */
  26. public function rules()
  27. {
  28. return [
  29. [['CreateUseId', 'CreateTime', 'OrderId'], 'required'],
  30. [['CreateUseId', 'OrderId'], 'integer'],
  31. [['CreateTime'], 'string', 'max' => 50],
  32. [['LogDesc'], 'string', 'max' => 500],
  33. ];
  34. }
  35. /**
  36. * @inheritdoc
  37. */
  38. public function attributeLabels()
  39. {
  40. return [
  41. 'ID' => Yii::t('app', 'ID'),
  42. 'CreateUseId' => Yii::t('app', 'Create Use ID'),
  43. 'CreateTime' => Yii::t('app', 'Create Time'),
  44. 'LogDesc' => Yii::t('app', '操作详情描述'),
  45. 'OrderId' => Yii::t('app', '订单号码'),
  46. ];
  47. }
  48. public function getOrderInvoiceInfo()
  49. {
  50. return $this->hasMany(OrderInvoiceInfo::className(), ['OrderID' => 'OrderId']);
  51. }
  52. public function getBaseUser()
  53. {
  54. return $this->hasOne(BaseUser::className(), ['ID' => 'CreateUseId']);
  55. }
  56. }