Shortmsg.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%shortmsg}}".
  6. *
  7. * @property string $id
  8. * @property string $msgid
  9. * @property string $recipient
  10. * @property string $content
  11. * @property string $receipt
  12. * @property integer $created_at
  13. * @property integer $sendtime
  14. */
  15. class Shortmsg extends \yii\db\ActiveRecord
  16. {
  17. /**
  18. * @inheritdoc
  19. */
  20. public static function tableName()
  21. {
  22. return '{{%shortmsg}}';
  23. }
  24. /**
  25. * @inheritdoc
  26. */
  27. public function rules()
  28. {
  29. return [
  30. [['msgid', 'recipient', 'content', 'created_at'], 'required'],
  31. [['created_at', 'sendtime'], 'integer'],
  32. [['msgid'], 'string', 'max' => 32],
  33. [['recipient'], 'string', 'max' => 20],
  34. [['content'], 'string', 'max' => 100],
  35. [['receipt'], 'string', 'max' => 10],
  36. ];
  37. }
  38. /**
  39. * @inheritdoc
  40. */
  41. public function attributeLabels()
  42. {
  43. return [
  44. 'id' => 'ID',
  45. 'msgid' => 'Msgid',
  46. 'recipient' => 'Recipient',
  47. 'content' => 'Content',
  48. 'receipt' => 'Receipt',
  49. 'created_at' => 'Created At',
  50. 'sendtime' => 'Sendtime',
  51. ];
  52. }
  53. }