UserReg.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%USER_REG}}".
  6. *
  7. * @property string $ID
  8. * @property string $USER_NAME 编号
  9. * @property string $REAL_NAME 姓名
  10. * @property string $CON_UID 安置ID
  11. * @property string $REC_UID 上级ID
  12. * @property string $PARENT_USER_NAME 上级编号
  13. * @property string $PARENT_REAL_NAME 上级姓名
  14. * @property string $NET_USER_NAME 安置人编号
  15. * @property string $NET_REAL_NAME 安置人姓名
  16. */
  17. class UserReg extends \common\components\ActiveRecord
  18. {
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public static function tableName()
  23. {
  24. return '{{%USER_REG}}';
  25. }
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public function rules()
  30. {
  31. return [
  32. [['USER_NAME', 'REAL_NAME', 'PARENT_USER_NAME', 'PARENT_REAL_NAME', 'NET_USER_NAME', 'NET_REAL_NAME'], 'required'],
  33. [['ID','CON_UID','REC_UID'], 'string', 'max' => 32],
  34. [['USER_NAME', 'PARENT_USER_NAME', 'NET_USER_NAME'], 'string', 'max' => 16],
  35. [['REAL_NAME', 'PARENT_REAL_NAME', 'NET_REAL_NAME'], 'string', 'max' => 128],
  36. [['ID'], 'unique'],
  37. ];
  38. }
  39. /**
  40. * {@inheritdoc}
  41. */
  42. public function attributeLabels()
  43. {
  44. return [
  45. 'ID' => 'ID',
  46. 'USER_NAME' => '编号',
  47. 'REAL_NAME' => '姓名',
  48. 'CON_UID' => '安置人ID',
  49. 'REC_UID' => '上级ID',
  50. 'PARENT_USER_NAME' => '上级编号',
  51. 'PARENT_REAL_NAME' => '上级姓名',
  52. 'NET_USER_NAME' => '安置人编号',
  53. 'NET_REAL_NAME' => '安置人姓名',
  54. ];
  55. }
  56. }