Giter Club home page Giter Club logo

jdoo's Introduction

Java版本odoo

核心设计**

一切皆模型,所有模型皆可扩展

开源协议

LGPL v3.0

模型示例代码

package org.jdoo.models;

import org.jdoo.*;

@Model.Meta(name = "test.model", description = "模型元数据")
public class TestModel extends Model {
    static Field name = Field.Char().label("名称").help("模型名称")
        .index(true).required(true);//.translate();
    static Field description = Field.Char().label("描述").help("模型说明");
    static Field inherit = Field.Char().label("继承").help("模型的继承,多个使用逗号','分隔");
    static Field type = Field.Selection().label("类型").help("模型的类型:普通、抽象、瞬态");
    static Field type_name = Field.Char().label("类名")
        .compute(Callable.script("r->r.get('name')+'('+r.get('type')+')'"))
        .store(false).depends("name", "type");

    /** 获取名称 */
    public String getName() {
        return (String) get(name);
    }

    /** 设置名称 */
    public void setName(String value) {
        set(name, value);
    }

    /** 获取描述 */
    public String getDescription() {
        return (String) get(description);
    }

    /** 设置描述 */
    public void setDescription(String value) {
        set(description, value);
    }

    /** 获取继承 */
    public String getInherit() {
        return (String) get(inherit);
    }

    /** 设置继承 */
    public void setInherit(String value) {
        set(inherit, value);
    }

    /** 获取类型 */
    public String getType() {
        return (String) get(type);
    }

    /** 设置类型 */
    public void setType(String value) {
        set(type, value);
    }	

    /** 获取类型名称 */
    public String getTypeName() {
        return (String) get(type_name);
    }

    /** Model method demo */
    @Model.ServiceMethod
    public void test(Records rec) {
        for (TestModel testModel : rec.of(TestModel.class)) {
            testModel.setType("integer");
            System.out.println(testModel.get_name());
        }
        //do something else
    }
}

应用安装示例: https://github.com/CSharpStudio/Jdoo/blob/main/apps.mp4?raw=true

低代码示例: https://github.com/CSharpStudio/Jdoo/blob/main/lowcode.mp4?raw=true

jdoo's People

Contributors

bacheloreric avatar csharpstudio avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.