ReceiveAddress.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. namespace common\models;
  3. use Yii;
  4. /**
  5. * This is the model class for table "{{%RECEIVE_ADDRESS}}".
  6. *
  7. * @property string $ID
  8. * @property string $USER_ID 用户ID
  9. * @property string $USER_NAME 用户编号
  10. * @property string $CONSIGNEE 收货人
  11. * @property string $MOBILE 收货人手机
  12. * @property int $PROVINCE 省份名称
  13. * @property int $CITY 城市名称
  14. * @property int $COUNTY 县区名称
  15. * @property string $ADDRESS 详细地址
  16. * @property string $ZIP_CODE 邮政编码
  17. * @property int $IS_DEFAULT 是否默认
  18. * @property int $CREATED_AT 创建时间
  19. * @property string $UPDATER 修改人
  20. * @property int $UPDATED_AT 修改时间
  21. */
  22. class ReceiveAddress extends \common\components\ActiveRecord
  23. {
  24. /**
  25. * {@inheritdoc}
  26. */
  27. public static function tableName()
  28. {
  29. return '{{%RECEIVE_ADDRESS}}';
  30. }
  31. /**
  32. * {@inheritdoc}
  33. */
  34. public function rules()
  35. {
  36. return [
  37. [['USER_ID', 'USER_NAME', 'CONSIGNEE', 'MOBILE', 'PROVINCE', 'CITY', 'COUNTY', 'ADDRESS'], 'required'],
  38. [['PROVINCE', 'CITY', 'COUNTY', 'IS_DEFAULT', 'CREATED_AT', 'UPDATED_AT'], 'integer'],
  39. [['ID', 'USER_ID'], 'string', 'max' => 32],
  40. [['USER_NAME'], 'string', 'max' => 16],
  41. [['CONSIGNEE'], 'string', 'max' => 120],
  42. [['MOBILE'], 'string', 'max' => 11],
  43. [['ADDRESS'], 'string', 'max' => 255],
  44. [['UPDATER'], 'string', 'max' => 10],
  45. [['ID'], 'unique'],
  46. ];
  47. }
  48. /**
  49. * {@inheritdoc}
  50. */
  51. public function attributeLabels()
  52. {
  53. return [
  54. 'ID' => 'ID',
  55. 'USER_ID' => '用户ID',
  56. 'USER_NAME' => '用户编号',
  57. 'CONSIGNEE' => '收货人',
  58. 'MOBILE' => '收货人手机',
  59. 'PROVINCE' => '省份名称',
  60. 'CITY' => '城市名称',
  61. 'COUNTY' => '县区名称',
  62. 'ADDRESS' => '详细地址',
  63. 'ZIP_CODE' => '邮编',
  64. 'IS_DEFAULT' => '是否默认',
  65. 'CREATED_AT' => '创建时间',
  66. 'UPDATER' => '修改人',
  67. 'UPDATED_AT' => '修改时间',
  68. ];
  69. }
  70. }