CurdMap.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?php
  2. namespace addons\RfDemo\common\models;
  3. use common\behaviors\MerchantBehavior;
  4. /**
  5. * This is the model class for table "{{%addon_demo_curd_map}}".
  6. *
  7. * @property int $id
  8. * @property int|null $merchant_id 商户id
  9. * @property int|null $curd_id
  10. * @property string|null $name 名称
  11. * @property float|null $shipping_fee 运费
  12. * @property string|null $type 类型
  13. * @property string|null $path 覆盖范围
  14. * @property string|null $polygon 覆盖范围
  15. * @property float|null $radius 半径
  16. * @property int|null $status 状态
  17. * @property int $created_at 创建时间
  18. * @property int $updated_at 更新时间
  19. */
  20. class CurdMap extends \common\models\base\BaseModel
  21. {
  22. use MerchantBehavior;
  23. /**
  24. * {@inheritdoc}
  25. */
  26. public static function tableName()
  27. {
  28. return '{{%addon_demo_curd_map}}';
  29. }
  30. /**
  31. * {@inheritdoc}
  32. */
  33. public function rules()
  34. {
  35. return [
  36. [['merchant_id', 'curd_id', 'status', 'created_at', 'updated_at'], 'integer'],
  37. [['shipping_fee', 'radius'], 'number'],
  38. [['path', 'polygon'], 'safe'],
  39. [['name'], 'string', 'max' => 100],
  40. [['type'], 'string', 'max' => 50],
  41. ];
  42. }
  43. /**
  44. * {@inheritdoc}
  45. */
  46. public function attributeLabels()
  47. {
  48. return [
  49. 'id' => 'ID',
  50. 'merchant_id' => '商户id',
  51. 'curd_id' => 'Curd ID',
  52. 'name' => '名称',
  53. 'shipping_fee' => '运费',
  54. 'type' => '类型',
  55. 'path' => '覆盖范围(默认)',
  56. 'polygon' => '覆盖范围',
  57. 'radius' => '半径',
  58. 'status' => '状态',
  59. 'created_at' => '创建时间',
  60. 'updated_at' => '更新时间',
  61. ];
  62. }
  63. }
粤ICP备19079148号