ReceiveAddress.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 string COUNTRY_ID 国家
  13. * @property int $PROVINCE 省份名称
  14. * @property int $CITY 城市名称
  15. * @property int $COUNTY 县区名称
  16. * @property string $LGA_NAME Lga
  17. * @property string $CITY_NAME City
  18. * @property string $ADDRESS 详细地址
  19. * @property int $IS_DEFAULT 是否默认
  20. * @property int $CREATED_AT 创建时间
  21. * @property string $UPDATER 修改人
  22. * @property int $UPDATED_AT 修改时间
  23. */
  24. class ReceiveAddress extends \common\components\ActiveRecord
  25. {
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public static function tableName()
  30. {
  31. return '{{%RECEIVE_ADDRESS}}';
  32. }
  33. /**
  34. * {@inheritdoc}
  35. */
  36. public function rules()
  37. {
  38. return [
  39. [['USER_ID', 'USER_NAME', 'CONSIGNEE', 'MOBILE', 'PROVINCE', /*'LGA_NAME', 'CITY_NAME', */'ADDRESS'], 'required'],
  40. [['PROVINCE', 'IS_DEFAULT', 'CREATED_AT', 'UPDATED_AT'], 'integer'],
  41. [['ID', 'USER_ID'], 'string', 'max' => 32],
  42. [['USER_NAME'], 'string', 'max' => 16],
  43. [['CONSIGNEE'], 'string', 'max' => 120],
  44. [['MOBILE'], 'string', 'max' => 15],
  45. [['ADDRESS'], 'string', 'max' => 255],
  46. [['LGA_NAME'], 'string', 'max' => 50],
  47. [['CITY_NAME'], 'string', 'max' => 50],
  48. [['UPDATER'], 'string', 'max' => 10],
  49. [['ID'], 'unique'],
  50. ];
  51. }
  52. /**
  53. * {@inheritdoc}
  54. */
  55. public function attributeLabels()
  56. {
  57. return [
  58. 'ID' => 'ID',
  59. 'USER_ID' => '用户ID',
  60. 'USER_NAME' => '用户编号',
  61. 'CONSIGNEE' => '收货人',
  62. 'MOBILE' => '收货人手机',
  63. 'COUNTRY_ID' => '国家',
  64. 'PROVINCE' => '省份名称',
  65. 'CITY' => '城市名称',
  66. 'COUNTY' => '县区名称',
  67. 'LGA_NAME' => 'Lga Name',
  68. 'CITY_NAME' => 'City Name',
  69. 'ADDRESS' => '详细地址',
  70. 'IS_DEFAULT' => '是否默认',
  71. 'CREATED_AT' => '创建时间',
  72. 'UPDATER' => '修改人',
  73. 'UPDATED_AT' => '修改时间',
  74. ];
  75. }
  76. }