MessageText.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%MESSAGE_TEXT}}".
  6. *
  7. * @property string $ID
  8. * @property string $TITLE 标题
  9. * @property string $CONTENT 内容
  10. * @property string $TO_UID 发给某个会员
  11. * @property int $IS_DEL 是否删除
  12. * @property string $ADMIN_ID 管理员ID
  13. * @property int $CREATED_AT 创建时间
  14. * @property int $DELETED_AT 删除时间
  15. */
  16. class MessageText extends \common\components\ActiveRecord
  17. {
  18. /**
  19. * @inheritdoc
  20. */
  21. public static function tableName()
  22. {
  23. return '{{%MESSAGE_TEXT}}';
  24. }
  25. /**
  26. * @inheritdoc
  27. */
  28. public function rules()
  29. {
  30. return [
  31. [['TITLE', 'CONTENT', 'CREATED_AT'], 'required'],
  32. [['IS_DEL', 'CREATED_AT', 'DELETED_AT'], 'integer'],
  33. [['ID', 'TO_UID', 'ADMIN_ID'], 'string', 'max' => 32],
  34. [['TITLE'], 'string', 'max' => 20],
  35. [['CONTENT'], 'string', 'max' => 4000],
  36. [['ID'], 'unique'],
  37. ];
  38. }
  39. /**
  40. * @inheritdoc
  41. */
  42. public function attributeLabels()
  43. {
  44. return [
  45. 'ID' => 'ID',
  46. 'TITLE' => '标题',
  47. 'CONTENT' => '内容',
  48. 'TO_UID' => '发给某个会员',
  49. 'IS_DEL' => '是否删除',
  50. 'ADMIN_ID' => '管理员ID',
  51. 'CREATED_AT' => '创建时间',
  52. 'DELETED_AT' => '删除时间',
  53. ];
  54. }
  55. }