SupplysModel.php 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. namespace addons\QiJuhe\common\models;
  3. use Yii;
  4. use yii\db\ActiveRecord;
  5. /**
  6. * This is the model class for table "{{%addons_qijuhe_supplys}}".
  7. *
  8. * @property int $id
  9. * @property int $mall_id
  10. * @property string $app_name 供应链名称
  11. * @property string $app_host appHost
  12. * @property string $app_key appKey
  13. * @property string $app_secret appSecret
  14. * @property string $token appSecret
  15. * @property string $expire_time appSecret
  16. * @property string|null $sell 售价策略
  17. * @property string|null $cost 成本价策略
  18. * @property string|null $original 原计策略
  19. * @property int $updated_at
  20. * @property int $created_at
  21. */
  22. class SupplysModel extends ActiveRecord
  23. {
  24. /**
  25. * {@inheritdoc}
  26. */
  27. public static function tableName()
  28. {
  29. return '{{%addons_qijuhe_supplys}}';
  30. }
  31. /**
  32. * {@inheritdoc}
  33. */
  34. public function rules()
  35. {
  36. return [
  37. [['mall_id', 'app_name', 'app_host', 'app_key', 'app_secret'], 'required'],
  38. [['mall_id', 'updated_at', 'created_at','expire_time'], 'integer'],
  39. [['sell', 'cost', 'original'], 'string'],
  40. [['app_name'], 'string', 'max' => 64],
  41. [['token'], 'string'],
  42. [['app_key', 'app_secret'], 'string', 'max' => 32],
  43. ];
  44. }
  45. /**
  46. * {@inheritdoc}
  47. */
  48. public function attributeLabels()
  49. {
  50. return [
  51. 'id' => 'ID',
  52. 'mall_id' => 'Mall ID',
  53. 'app_name' => 'App Name',
  54. 'app_host' => 'App Host',
  55. 'token' => 'token',
  56. 'expire_time' => 'expire time',
  57. 'app_key' => 'App Key',
  58. 'app_secret' => 'App Secret',
  59. 'sell' => 'Sell',
  60. 'cost' => 'Cost',
  61. 'original' => 'Original',
  62. 'updated_at' => 'Updated At',
  63. 'created_at' => 'Created At',
  64. ];
  65. }
  66. }