Struct ModelTemp

Source
pub struct ModelTemp {
    pub addon: AddonTemp,
}
Expand description

模型模版

Fields§

§addon: AddonTemp

Trait Implementations§

Source§

impl Model for ModelTemp

Source§

fn name(&mut self) -> &'static str

模型名称
Source§

fn table(&mut self) -> &'static str

数据库表名称
Source§

fn title(&mut self) -> &'static str

模型标题
Source§

fn fields(&mut self) -> JsonValue

字段列表
Source§

fn action(&mut self, _name: &str) -> Box<dyn Action>

模型动作
Source§

fn version(&mut self) -> &'static str

版本号
Source§

fn describe(&mut self) -> &'static str

模型描述
Source§

fn unique(&mut self) -> Vec<&'static str>

数据库唯一约束
Source§

fn index(&mut self) -> Vec<Vec<&'static str>>

查询索引
Source§

fn primary_key(&mut self) -> &'static str

主键
Source§

fn partition(&mut self) -> bool

数据库分区
Source§

fn partition_columns(&mut self) -> JsonValue

分区配置 *列名 *分区key *实例 array![str, array![range1, range2, range3…]] *如果在已有分区的情况下想要修改分区的参照列,先要将当前分区代码删除后刷库,然后写新的分区规则再刷库
Source§

fn init_data(&mut self)

初始化数据库
Source§

fn table_fields(&mut self) -> JsonValue

前端搜索字段
Source§

fn tools(&mut self) -> Tools

获取工具集合
Source§

fn table_tree_fields(&mut self) -> JsonValue

前端-树型-搜索字段
Source§

fn columns(&mut self, fields: Vec<&str>) -> JsonValue

前端-列数据
Source§

fn query_fields(&mut self, fields: Vec<&str>) -> JsonValue

前端-高级查询条件字段
Source§

fn filter_title(&mut self, fields: Vec<&str>) -> String

前端-模糊查询标题
Source§

fn btn_data( &mut self, title: &str, action: Box<dyn Action>, mode: BtnMode, color: BtnColor, match_condition: Vec<Vec<&str>>, ) -> JsonValue

前端-按钮数据
Source§

fn table_select_fields(&mut self) -> JsonValue

前端 关联搜索字段
Source§

fn dict_select_fields(&mut self) -> JsonValue

前端 关联字典搜索字段
Source§

fn fields_name_list(&mut self, filter: Vec<&str>) -> Vec<String>

模型字段名称列表

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.